I have a table that is fed by a data source. The data presented in the table is sorted, while of course the source is not.
When I add or change an item in the data source, the selection bar doesn’t stick with the item it was under before. It just sits there at the same point among the viewable rows. I want to make it move as necessary to stick with the same item, no matter how the data change.
But that means I need to compare something to something, and here’s where I get lost. When I’m not using a data source, I just check the selected row before the change, check which datum that corresponds to (since my data and the table are both sorted in the same order), then find that item again after the data is updated, and set the selected row to that item’s place in my data.
When I’m using a data source, and the table is sorted, how do I do the same thing?
-Joe