Hi,
We are using UltaWinGrid and Bind it with Business Object. Undo Operation is working when we are Editing Cell
Data. but if new Rows are added or edited to DataSource and then try to do undo, its not working. it is only working when we do some
modification in Grid cells. Can you please guide me how i can implement undo operation so it will work for
all condition. currently i am directly call perform action.
Thanks.
In order to cancel an AddNewRow, the grid's DataSource needs to support IEditableObject or ICancelAddNew.
Can you Give me some Detail how i can Implement the IEditableObject Interface in my Business object. is there any modification is required in Grid events for the same ?
Kumar_Nagaraju said:Can you Give me some Detail how i can Implement the IEditableObject Interface in my Business object.
IEditableObject is part of the DotNet framework, it's not an Infragistics class. You will need to check Microsoft's documentation for samples and instructions on how to implement it.
But if you are you using a BindingList<T>, I'm pretty sure it already implements ICancelAddNew. So that might save you some work if you just use a BindingList or a derived BindingList for you data.
Kumar_Nagaraju said:is there any modification is required in Grid events for the same ?
No, this has nothing to do with the grid.
If it's not working with a DataTable, then something is wrong. There's no reason I know of why this would not work with a DataTable.
Perhaps you could post a small sample project demonstrating this? You can either post the sample here or Submit an incident to Infragistics Developer Support and we will be happy to take a look.
I tried to bind UltraWinGrid with DataTable also, Undo operation is not working with datatable when adding new row to table or delete the row from table. as per your suggestion DataSource should support IEditableObject. as per my understanding DataTable has all the three methods, BeginEdit,EndEdit and CancelEdit. eventhough undo operation is not working,
Thanks