cluettr
11 Aug 2007, 10:22 AM
I am attempting to update my backend once a cell is edited. While I have the code down I do not have a unique value from the record (the id) to use as an identifier for the update. Yes, I do not know javascript. I'll only claim I do when I don't have to ask anymore questions here : ) BUT... anyways... Here is my code:
My assumption is that I can somehow pull it from the 'record' object. If so, what is the syntax?
grid.on('afteredit', saveCellValue);
function saveCellValue(cell)
{
alert('Field=' + cell.field + "=" + cell.value
+ " | Record =" + cell.record
+ " | Original Value =" + cell.originalValue
+ " | Row =" + cell.row
+ " | Column =" + cell.column
);
var conn = new Ext.data.Connection();
conn.request({
method: 'POST'
, url: 'rma/_scripts/save_grid_rma_details.php'
, params: { action: 'update', field: cell.field, value: cell.value}
});
conn.on('requestcomplete', function(sender, param)
{
});
}
My assumption is that I can somehow pull it from the 'record' object. If so, what is the syntax?
grid.on('afteredit', saveCellValue);
function saveCellValue(cell)
{
alert('Field=' + cell.field + "=" + cell.value
+ " | Record =" + cell.record
+ " | Original Value =" + cell.originalValue
+ " | Row =" + cell.row
+ " | Column =" + cell.column
);
var conn = new Ext.data.Connection();
conn.request({
method: 'POST'
, url: 'rma/_scripts/save_grid_rma_details.php'
, params: { action: 'update', field: cell.field, value: cell.value}
});
conn.on('requestcomplete', function(sender, param)
{
});
}