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.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.