C
Chris
Hi all,
I posted the following in microsoft.public.dotnet.framework.windowsforms
but it seems that group has little traffic.
Hi all,
I have a listview box which is populated from methods of objects stored in
a List<T> collection. The
items in this collection are generated from a user filled out form.
The items in the listview have the same index as the ones in List<T>, so I
have an event which loops through the ListView, and if selected = true, the
data from the corresponding List<T> is used to populate a form - so in
effect creating an edit function. On Editing the data, the ListView is
regenerated, reading it's needed data from List<T> items (effectively
updating itself).
Is there any easier way to do this? It works fine, but I want to add search
capabilities to the ListView items, which if sorted, would no longer share
the same index as the List<T> items. One solution is to resort List<T>
(perhaps having a TempList<T>) so as to show only specific items and ensure
List<T> and ListView indexes still match. Or should I create a int field of
the List<T> items which has a permanent unique index and use this?
What is usually done in such circumstances?
Any help would be appreciated,
Chris
Ps if this isn't the right NG for these sort of questions, please let me
know where I should post them .
I posted the following in microsoft.public.dotnet.framework.windowsforms
but it seems that group has little traffic.
Hi all,
I have a listview box which is populated from methods of objects stored in
a List<T> collection. The
items in this collection are generated from a user filled out form.
The items in the listview have the same index as the ones in List<T>, so I
have an event which loops through the ListView, and if selected = true, the
data from the corresponding List<T> is used to populate a form - so in
effect creating an edit function. On Editing the data, the ListView is
regenerated, reading it's needed data from List<T> items (effectively
updating itself).
Is there any easier way to do this? It works fine, but I want to add search
capabilities to the ListView items, which if sorted, would no longer share
the same index as the List<T> items. One solution is to resort List<T>
(perhaps having a TempList<T>) so as to show only specific items and ensure
List<T> and ListView indexes still match. Or should I create a int field of
the List<T> items which has a permanent unique index and use this?
What is usually done in such circumstances?
Any help would be appreciated,
Chris
Ps if this isn't the right NG for these sort of questions, please let me
know where I should post them .