Re: Saving Listview Selected Item Problems
- From: "Dave O." <nobody@xxxxxxxxxxx>
- Date: Mon, 10 Sep 2007 09:59:41 +0100
"JP Bless" <jp3BlessNoSpam@xxxxxxxxxxx> wrote in message
news:Oum9AS08HHA.5404@xxxxxxxxxxxxxxxxxxxxxxx
Some sort of "hack" solution. If you are reading data from some table andIt's a LOT easier to "encode" that unique code into the listitem key than
the records have unique (record) number... if the user does not need to
see the unique record then create an extra listview column with 0 column
width. When your app close you save the unique number of the last selected
item. When your app open you use code like the one below to select the
last Item
For Each itmx in YourListView
If YourUniqueNumber = HiddenColumnData then
'Set as selected Item... put selected Item code here
Exit for
End if
Next
mucking about with hidden columns and all the subclassing that is needed to
be certain that the column remains hidden.
Then all he needs to select is:
ListView1.ListItem(KEY).Selected = True
Where KEY is the key - duh!
Regards
Dave O.
.
- Follow-Ups:
- Re: Saving Listview Selected Item Problems
- From: Saucer Man
- Re: Saving Listview Selected Item Problems
- References:
- Saving Listview Selected Item Problems
- From: Saucer Man
- Re: Saving Listview Selected Item Problems
- From: JP Bless
- Re: Saving Listview Selected Item Problems
- From: Saucer Man
- Re: Saving Listview Selected Item Problems
- From: JP Bless
- Saving Listview Selected Item Problems
- Prev by Date: Re: Vista Support
- Next by Date: Re: Saving Listview Selected Item Problems
- Previous by thread: Re: Saving Listview Selected Item Problems
- Next by thread: Re: Saving Listview Selected Item Problems
- Index(es):