B
Bruce
Hi
I am implementing a simple app in C# where I show a list of files in a
form. (set of ListViewItems in ListView.Items)
I create these ListViewItems using an arraylist of my custom objects
FileObj (each ListViewItem's Tag property refers to the corresponding
FileObj object)
Now, when the user clicks on a file and chooses some operation, I use
delegates to process the request in a worker thread. Once it is done,
it calls back into the UI thread. Then, I need to update a column in
the view for the file on which the operation was done. (i want to
change column value to "operation done")
Now, my problem is, how do I find which file in the list view I need
to update? How do I map the response to the correct ListViewItem?
I do not want to redraw the entire view since I could have 100s of
files. But I also do not want to add some property like view index in
FileObj class since I want to separate the view and model.
Is there a clean way to do this?
Thanks
Bruce
I am implementing a simple app in C# where I show a list of files in a
form. (set of ListViewItems in ListView.Items)
I create these ListViewItems using an arraylist of my custom objects
FileObj (each ListViewItem's Tag property refers to the corresponding
FileObj object)
Now, when the user clicks on a file and chooses some operation, I use
delegates to process the request in a worker thread. Once it is done,
it calls back into the UI thread. Then, I need to update a column in
the view for the file on which the operation was done. (i want to
change column value to "operation done")
Now, my problem is, how do I find which file in the list view I need
to update? How do I map the response to the correct ListViewItem?
I do not want to redraw the entire view since I could have 100s of
files. But I also do not want to add some property like view index in
FileObj class since I want to separate the view and model.
Is there a clean way to do this?
Thanks
Bruce