本实例演示如何取得选中行数据。
数据网格(datagrid)组件包含两种方法来检索选中行数据:
Item ID
Product ID
List Price
Unit Cost
Attribute
Stauts
取得选中行数据:
var row = $('#tt').datagrid('getSelected');
if (row){
alert('Item ID:'+row.itemid+"
Price:"+row.listprice);
}取得所有选中行的 itemid:
var ids = [];
var rows = $('#tt').datagrid('getSelections');
for(var i=0; i没有安装环境需要下载这两个脚本:
http://code.jquery.com/jquery-1.6.1.min.js
http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js
| 留言与评论(共有 0 条评论) “” |