// easyUI datagrid when the multi-selection box, how to record the selected row still after page;
// Note datagrid idField property needs to be configured, generally as the primary key data
$.ajax({ type: 'GET', url:url, async:false, success: function (dt) { were grid = $ ( ' #list ' ); grid.datagrid ( ' reload ' ); // refresh data table grid.datagrid ({ onLoadSuccess:function(){ grid.datagrid ( " clearSelections " ); // selected recording state before clearing rows var rows = grid.datagrid ( " o getRows " ); // Get form data // cyclic data ID list and find the need to select the data ID equal data and check for ( var J = 0 ; J <rows.length; J ++) { // cycle data table var the rowId = rows [J] .Uid; for ( var I = 0 ; I <dt.length; I ++ ) { // cycle to check out the status of the data set selected row var Id =dt [I] .master; IF (the rowId == Id) { var index = grid.datagrid ( " getRowIndex " , rows [J]); // Get the index of the position of the line data grid.datagrid ( " SelectRow " , index) ; // set to the selected state } } } } }) } });