View Full Version : When adding rows to a grid need to auto set cells in row added to updated

15 Sep 2009, 5:13 AM

I am adding rows to a grid. When I click on the save button I have a check to ensure that only rows with edited/updated cells are saved.

I want to ensure that all cells in rows added to the grid are autoset to Updated but am not sure how to do so. How do you auto set a cell to updated i.e. shows the red triangle in the corner of the cell. I have coped my row addition code below.

Thank you for your help.

text: 'Bulk Suggest',
tooltip:'Adds a row per underlyer pre-loaded with current data',
handler : function(){

url: 'products.do',
params: {action: 'underlyingSuggest'},
success: function(response, options) {
var data = Ext.util.JSON.decode(response.responseText);
var numberOfUnderlyers=data.list.underlying.length;
for ( var i=0; i<numberOfUnderlyers; ++i ){
var suggestedUnderlyer = new enUnderlying({'setdate': new Date(),'@underlyingId':data.list.underlying[i][email protected],'@underlyingSource':data.list.underlying[i][email protected],'@price':data.list.underlying[i][email protected],'@futureUndAdj':data.list.underlying[i][email protected],'@stopLossPremium':data.list.underlying[i][email protected],'@margin':data.list.underlying[i][email protected],'@repo':data.list.underlying[i][email protected]});
dsUnderlying.insert(0, suggestedUnderlyer);

failure: function(response, options) {
Ext.Msg.alert('Error', 'Error: Request seemed to have timed out [30secs]!');
text: 'ERROR : Could not save ' + currentCompo,
iconCls: 'ok-error',
clear: true