I have a scenario where we do very specialized validations. In these validations we may get a pass or a fail on an update of the row. On failed validation, we will have to revert the modified data in the row. I was looking through the api and found the following which I think may work for me. What I am not understanding is on how I should this be used. Is the following command targeting a single selected row or is it target multiple selected rows. I just want to verify this before I go run off changing code.
this.ugDataGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.UndoRow)
Thanks in advance.
Hello,
You are on the right path. This action targets the active row if he doesn't have any cells in EditMode. Here is a link from our online documentation describing the UltraGridAction enumerator: http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v9.1~Infragistics.Win.UltraWinGrid.UltraGridAction.html
You can use this with the ultraGrid1.UpdateData(); which saves any changes made in the grid to the data source it is using.
Hope this helps.
Sincerely,
Petar Monov,
DS Engineer,
Infragistics Bulgaria
In the same topic, can I change the active row without changing the selectedrows collection. I have a dialog where the actual assign to grid takes place and at the end, if row(s) does not comply with the validaiton, I have to perform undo. This action can be for a single or many rows in the selection. Should I be doing a loop, setting the active row of the grid (hoping the selection does not break) and then perform an undo.