Dear All,
I am trying to implement a method for refreshing edatagrid row contents display without changing its state. Does the method below will achieve my intent? How do I implement it in edatagrid. TIA.
updateRowDisplay: function(target, rowIndex) {
var opts = $.data(target, 'datagrid').options;
var rows = $(target).datagrid('getRows');
var styleValue = opts.rowStyler ? opts.rowStyler.call(target, rowIndex, rows[rowIndex]) : '';
function _update(frozen) {
var fields = $(target).datagrid('getColumnFields', frozen);
var tr = opts.finder.getTr(target, rowIndex, 'body', (frozen ? 1 : 2));
var checked = tr.find('div.datagrid-cell-check input[type=checkbox]').is(':checked');
tr.html(this.renderRow.call(this, target, fields, frozen, rowIndex, rows[rowIndex]));
tr.attr('style', styleValue || '');
if (checked) {
tr.find('div.datagrid-cell-check input[type=checkbox]')._propAttr('checked', true);
}
}
$(target).datagrid('fixRowHeight', rowIndex);
},
Regards,
Alex Wijoyo