Easyui-DataGrid 分页多选框 及 遍历所有选中项

 

html

<table id='grid' class='easyui-datagrid' style='height:500px'  url='Ajax-index.php?module=<{$module_name}>&action=Ajax_GridView_Select&assigned_user_id=<{$assigned_user_id}>&start_time=<{$start_date}>&stop_time=<{$stop_date}>&install_office=<{$install_office}>&role_name=<{$role_name}>&selected=false';
            title='出纳应收款列表' iconCls='icon-table' rownumbers='true'  toolbar='#toolbar' fitColumns='false' singleSelect='false' pagination='true'
            data-options="pageSize:50,idField: 'id',">  
         <!--  pagination='true' width:1200px;--> <!--注意,分页多选,关键是要设置 data-options中的  idField-->

javascript  遍历选中项

var checkedItems = $('#grid').datagrid('getChecked');
var arrId = [];
$.each(checkedItems, function(index, item){
  arrId.push(item.id+'@'+item.order_id);// id@order_id
});

 

posted @ 2018-05-10 17:01  海乐学习  阅读(1271)  评论(0编辑  收藏  举报