I realize this is a pretty old post, but I’m seeing a lot of applicability to some Grid work I’m currently working on. Two questions:
a.) Why does the grid have to wait for Application_Idle before updating the underlying dataSource? Is this a bug? Is there a fix in the works? I’ve noticed that no matter how simple or complex the grid I create, when LeavingEdit fires on a cell or row the first time, my DataSet.HasChanges is always false. If I then make another change, to another row or cell, then my DataSet shows as having changes. If this is truly databound, shouldn’t the update to the DataSet occur at the same point as changes are committed to the Grid?
b.) When I call DataSet.AcceptChanges, the entire grid refreshes, and it sets the row in focus back to the first row. Is there a way to a.) set this back to the row that was selected before the update or b.) if not, what is the best event to use to trap the row that was selected before the update (I’ll call it “LastFocusedRow” here)? Sometimes a user will commit a change by hitting Enter (which calls LeavingEdit…the LastFocusedRow will be the same as the one that was last edited). Other times the user will click to a different row, which I suppose could be captured by some other event, but that event would need to fire between LeavingEdit and Application_Idle…what event is that?
Imported from legacy forums. Posted by Rich (had 500 views)