Easyui DataGrid Code:
<TableID= "tabgrid20170726191838251403"class= "Easyui-datagrid"params= "fit:true,border:false,selectoncheck:true,remotesort:false, url: ' Http://localhost:8090/gzdbthreeweb/engine /loadquerydata.pt?_queryid=20170726191838251403&dataid=20170726191919776397&gridtype=1 ', Rownumbers: True,pagination:true,pagenumber:1,pagesize:10,checkonselect:true,checkonselect:true,onclickrow:o nClickRow20170726191838251403, toolbar: ' #tb20170726191838251403 ' "> <thead> <TR> <thparams= "field: ' _checkid ', checkbox:true"rowspan= "1"></th> <throwspan= "1"colspan= "1"params= "align: ' Left ', field: ' Report_task ', sortable:true"width= "442px">Specific tasks</th> <throwspan= "1"colspan= "1"params= "align: ' Left ', field: ' Main_dept_name ', sortable:true"width= "347PX">Host organization</th> <throwspan= "1"colspan= "1"params= "align: ' Left ', field: ' Assist_dept_name ', sortable:true"width= "332px">Co-organizer</th> </TR> </thead></Table><ahref="#"class= "Zxui-linkbutton"Plain= "true"ID= "button495769"Iconcls= "NULL"onclick= "onClickbutton495769 ();" >End escalation</a>
Get the ID of the selected row and stitch it up:
function onClickbutton495769 () {var rows = $ (' #tabgrid20170726191838251403 '). DataGrid (' getselections '); if (Rows! = NULL) {var ids = ""; for (var i=0;i<rows.length;i++) {ids+= rows[i].id+ ",";} alert (IDs);}}
Click on the specific task to achieve the jump:
function onClickRow20170726191838251403 (rowindex, RowData) {var row = $ (' #tabgrid20170726191838251403 '). DataGrid (' GetSelected '); if (row! = null) {var report_id = row.id; alert (report_id); window.location.href= "http://localhost:8090/gzdbthreeweb/ Engine/page_init.pt?_queryid=20170726205804017541&report_id= "+REPORT_ID; }}
Easui DataGrid Row To get all the background SQL data: Support row Chockbox Multi-Select, output the selected line any property, support click on the table attributes to implement the jump, support paging.