All the checked rows are stored in 'checkedRows' of the datagrid. You can set it with the rows that you want them to be checked. Please try this code.
var dg = $('#dg');
var state = dg.data('datagrid');
state.checkedRows = data;
dg.datagrid('loadData', data)