Hi there
I am trying to keep track of modified rows of the WebDataGrid. The following discussion http://ko.infragistics.com/community/forums/t/67651.aspx implies that IsDirty() method of GridRecord is not going to work. So to keep track of the modified values I have added a hidden data bound column to the grid – bound to ‘Status’ property of the record and implemented EditingClientEvents-CellValueChanging event handler on the client side. The event handler sets a value in the hidden column. On the server side, when a "Save" button is pressed on a form, I iterate trough the WebDataGrid rows, check the value of the ‘Status’ property and save the records that are added or modified.
The event handler for CellValueChanging looks like this:
function updateEntityState_OnChange(sender, eventArgs) {
for (i = 0; i < eventArgs._cell._row._element.cells.length; i++)
{
if (sender._columns._items[i]._key == 'Status') {
var status = eventArgs._cell._row._element.cells[i].firstChild.nodeValue;
if (status == null) {
eventArgs._cell._row._element.cells[i].firstChild.nodeValue = 2/*Added*/;
}
else if (status == 0/*Unchanged*/) {
eventArgs._cell._row._element.cells[i].firstChild.nodeValue = 1/*Modified*/;
break;
The implementation above does not work. When I step though the code in the debugger everything looks fine but the when I check the row on a server a value in “Status” column is always 0.
I have three questions here:
Thank you
Boris
Hello boris_qbf,
Thank you for posting in our community.
I'm currently looking into this matter and will keep you posted of any available information.
At the meantime if you have any additional questions, please let me know.
Sincerely,
Tsanna