Hi,
I am updating infragistics grid from ultrawebgrid to webdatagrid. While submitting values from client-side,(Existing code) we used ChangedCell property of ultrawebgrid, I want same functionality in webdatagrid of 'ChangedCells' property.
var a = gridObject.ChangedCells.<fieldId>;
I have searched, it returns a pseudo array of all changed cells. Now I have to convert it into webdatagrid but I didn't find it.
{We defined grid in html form and submission is happening after clicking on 'Submit' button. (So it is not an event).}
Thanks
Shyam
Hello Shyam,
Thank you for posting in our forums!
Since the structure of the UltraWebGrid and the WebDataGrid differ, you may need to slightly modify how you access and handle the changed cells.
If you have BatchUpdating enabled, this will prevent cells from being committed to the server until the user performs the next postback, which would leave the data on the client.
You can find more information on BatchUpdating in our documentation here:
http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=WebDataGrid_Batch_Updating.html
You can then use the editedRows property of the client side EditingCore object. This property returns an array of rows that have been edited and not yet commited to the server.
To know which specific cells in this row that were added, I recommend adding a hidden column that you can store the index of each edited cell when a cell is edited. You can then check this column for edited cells and index into the editedRows array to get the edited cells.
A simple example of this would be the following:
foreach (editedRow in wdg.get_behaviors().get_editingCore().get_editedRows()) { foreach (editedCellIndex in editedRow.get_cellByColumnKey("editedCellsColumn").get_value()) { var editedCell = editedRow[editedCellIndex]; } }
You can find more information on the editedRows property in our documentation here:
http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=WebDataGrid~Infragistics.Web.UI.EditingCore_members.html
If you need any further assistance with this, please let me know and I will be glad to help.
Please let me know if you have any other questions or concerns about this issue and I'll be glad to help you.