Dear Sir,
I would like to update some cell value after close update window without reload datagrid.
But after used updateRow method the column formatter that display linkbutton disappear only updated row.
Could you advice how to correct.
<script type="text/javascript">
function fmCmd(value, row) {
var cmd = '<a href="javascript:void(0)" onclick="setTimeout(function() {' + 'viewPatron(\'GridPatron\',0)},500)' + '" class="easyui-linkbutton" iconCls="icon-aim" title="Open Update Window"></a>';
return cmd;
}
function updateLastAct(last_action) {
var selectedRow = $('#GridPatron').datagrid('getSelected');
var rowIndex = $('#GridPatron').datagrid('getRowIndex', selectedRow);
$('#GridPatron').datagrid('updateRow', {
index: rowIndex,
row: {
last_act: last_action
}
});
}
</script>
<table id="GridPatron" class="easyui-datagrid" border="true" idField="id"
data-options="
url: 'getPatrons.ashx',
method: 'post',
fit: true,
pagination: true,
singleSelect: true,
},
onLoadSuccess:function(data){
$(this).datagrid('getPanel').find('a.easyui-linkbutton').linkbutton();
}
">
<thead>
<tr>
<th data-options="field:'expire',align:'center',resizable:true" width="9%"><b>Expire</b></th>
<th data-options="field:'last_act',align:'left',resizable:true" width="12%"><b>Last Activity</b></th>
<th data-options="field:'id',align:'center',formatter:fmCmd" width="9%"><b>Command</b></th>
</tr>
</thead>
</table>
Thank you for you help.