标签:
组件:datagrid
获取选中行(单行)
var row = $(‘#tt‘).datagrid(‘getSelected‘);
if (row){
alert(‘Item ID:‘+row.itemid+"\nPrice:"+row.listprice);
}
获取选中行(多行)
var ids = [];
var rows = $(‘#tt‘).datagrid(‘getSelections‘);
for(var i=0; i<rows.length; i++){
ids.push(rows[i].itemid);
}
alert(ids.join(‘\n‘));
。。。。。。用到继续记录
标签:
原文地址:http://www.cnblogs.com/shiguotao-com/p/4515601.html