Why is getselections in the DataGrid able to fetch only one row of values?

Source: Internet
Author: User

$ (' #Yptable '). DataGrid ({
Method: ' Get ', transfer format ' post ' and ' get '
Pagination:true,//pagination bar
Rownumbers:true,//Line number
Singleselect:false,
Loadmsg: ' ... In process, please wait ... ',
URL: '/ypinfo/getyplist ',
Toolbar: [{
Text: ' Delete ',//toolbar: Delete button
Iconcls: ' Icon-remove ',
Handler:function () {
Delete Event
var ids = [];
Get Selection row
var rows = $ (' #Yptable '). DataGrid (' Getselections ');
for (var i = 0; i < rows.length; i++) {
Ids.push (ROWS[I].TYMC);
}
Alert (Ids.join (': '));

}
}]
});

 

The problem is solved, if there is no IDfield attribute, getselections can only get the value of one row

http://jquery-easyui.wikidot.com/forum/t-280470

Why is getselections in the DataGrid able to fetch only one row of values?

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.