:: Forum >>

Cell State

Is there a way to get the cell or row status? Example: modified cells/rows or delete/inserted rows.

Or is this something I need to implement. If so, does anyone have an example?

Thanks!
Gary
Thursday, August 17, 2006
Hi,

I am not sure if it is correct or not, I am doing this way and working fine
for me.

//Whenever cell is updated, this method will be called and the row number will be added to the updatedRow array.
// Before it adds, it makes sure that the row number dosen't exists alreday.
function addToRowUpdate(row)
{
var alreadyExists = false;
for(i =0; i<updatedRow.length;i++)
{
if(updatedRow[i] == row)
{
alreadyExists = true;
break;
}
}

if(!alreadyExists)
{
updatedRow[updatedRowCount++] = row;
}
}


whenever a cell is updated I call this method and store the row number and when a user clicks on a save button, I generate Xml message for the updated rows and send them to the server.
[code]gridObj.onCellValueChanged = function(value, col, row)
{
addToRowUpdate(row);
}


//Will be called when a textbox field is changed(Please note: Not on a combo box )(for combo box gridObj.onCellValueChanged will be called)
gridObj.onCellValidating = function(value, column, row)
{
addToRowUpdate(row);[/code]


these are the places where I call this method.
I hope, this may help you.


Bobby Sands
Thursday, August 17, 2006
Thanks! Your code worked perfectly.
Gary
Friday, August 18, 2006

This topic is archived.


Back to support forum

Forum search