Click the check button on column header, only the current page rows are checked. You can custom this behavior by overriding the 'onCheckAll' and 'onUncheckAll' event handlers.
$('#tt').datagrid({
url:'test.php',
pagination:true,
idField:'itemid',
onCheckAll:function(){
var state = $(this).data('datagrid');
$.ajax({
url:'getallrows.php',
type:'POST',
dataType:'json',
success:function(data){
state.checkedRows = data.rows;
state.selectedRows = data.rows;
}
})
},
onUncheckAll:function(){
var state = $(this).data('datagrid');
state.checkedRows = [];
state.selectedRows = [];
}
});