Announcement

Collapse
No announcement yet.

ListView: edit item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ListView: edit item

    Hello, again...

    I have read through the MSDN about ListView controls and I have
    written some code that lets me edit the first item in my ListView
    control but... Is there any way to edit ANY of the items AND subitems
    in the control, sort of like a spread sheet?


    ------------------
    Cheers

  • #2
    Assuming you have your ListView setup in Report Mode??? You will
    not get the ListView to behave in the same manor as in the first
    column, that is, a little edit box pops up to accept your changes
    then hides and applies the change to that specific Row/Column. However
    with some additional code you can get something close. Somebody posted
    an example of the listview in report mode with grid lines. This example
    detects double clicks and ID's the Row/Column and pops up with a message
    box that shows that rows contents. You could modify this code to have
    your own dialog box with an edit field and then apply the changes to
    the listview control. I would prefer to mimic the same behavior by
    placing a borderless edit control into that cell, edit that field, then
    hide the edit control and apply your changes. If you look at my source
    code "Start of my Grid" in the Source Code Forum you will see how I
    snuggly placed the edit control inside the cell to make it look like
    a real editable cell.

    If you want both code snippets, drop me an email and I will forward
    them to you.

    Regards, Jules mailto:[email protected][email protected]</A>



    ------------------
    Best regards
    Jules
    www.rpmarchildon.com

    Comment

    Working...
    X