Hi Phillip Piper, first of all, i apologize for my bad english, i'm learning it. I'm only speak spanish.
I use your project in one of mine. It is very useful and easy to use, but recently, I had the need to select an especific row in the list after to re-asign a DataSet containing the data (like to remember the position of it), to do it, i catch the SelectedObject with "GetSelectedObjet" method, then clean the selection with "SelectObject(null)" and then I update the dataset and re-asign it to the ListView again.
When I try to select the remembered object with "SelectObject(myobject);" it doesn't anything. I guess that it is for the "myobject" saves a reference to object in ListView, and when i clear the selection of it and re-asign the data, it reference lost.
Would be nice if you implement a method in that we can select an object passing the index!
If I understand your requirement correctly, you need only do something like the following in your scenario:
// Update all selected objects in the Object List View (selection remains unchanged)
foreach (MyModel obj in olv.SelectedObjects) // Note: list.GetSelectedObject/s() is deprecated
obj.Value = newValue; // Update object as needed
olv.RefreshObject(obj); // Tell the list the object has been updated
If you only need to update a single row, you can use list.SelectedObject in a similar way.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Aug-14 16:27