hi I have a datagrid with one cell editing:
<th data-options="field:'tag',width:80,align:'center',halign:'center',sortable:true,
styler: function (value,row,index){
return 'background-color:'+row.codigo+';';
},
formatter:function(value,row){
return row.tag;
},
editor:{
type:'combobox',
options:{
valueField:'id_estatus',
textField:'tag',
method:'get',
url:'retrieve/get_cmb.php',
required:true,
editable: false,
onLoadSuccess:function(data){
//alert(JSON.stringify(data));
},
onLoadError:function(data){
//alert(JSON.stringify(data));
}
}
}">TAG</th>
As you can see, the styler property gets the background color from a row.codigo, so after edit this row I want the background color changes as well.
I see the updateRow method, but I cant figure out how use it to change the styler property
$('#dg').datagrid('updateRow',{
index: 2,
row: { --------------------------------\
name: 'new name',-------------> No need this
note: 'new note message'-----/
}--------------------------------------/
styler: row.codigo, -----------------------------> how set the new background color?
??
});
Thank you