I have a problem with unselecting the new Row in my grid.
To explain the problem, i have a grid, where the user can add data to by using the new Row.
When clicking the new Row, it gets populated with some default data and can be edited.
I wanted to make sure the edited data gets saved when the user leaves the new Row,
so i used the UserAddingRow event to open a MessageBox to ask the user if he wants to save.
If yes, all right.
If no, I use e.Cancel to reject the data.
=> At this point I would like the new Row to change back to the initial "Click here to add new row" state,
but it stays selected or defined as CurrentRow. The data is gone, but an empty row stays as long as I don't switch to
another row manually, even when the data bound to the grid changes.
I can't find a way to unselect the row or set CurrentRow = null, as it seems not to be possible out of the event.
Also there seems to be no other event to hook up to after UserAddingRow when cancelled.
Maybe there is an easy way of unselecting, or maybe I'm using the wrong event for that purpose.
I would be glad for some help. :)
sender, GridViewRowCancelEventArgs e)
var result = RadMessageBox.Show(
(result == DialogResult.OK)
// CurrentRow = null ??