$("#wa30_05_roomList&#34)。kendoGrid({
dataSource: wa30_05_roomDataSource,
height: 550,
autoBind: false,
groupable: false,
scrollable : true,
sortable: true,
selectable: 'row',
change: fn_wa30_05_gridClick,
columns:
[
{ title: "<span class='checkbox'><input id='wa30_05_allChk' type='checkbox'><label for='wa30_05_allChk'></label></span>"
, width: 30 , template: '<span class="checkbox"><input id=wa30_05_#=room_no# name="wa30_05_choice" type="checkbox" value=#=room_no#><label for=wa30_05_#=room_no#></label></span>'},
{ field: "room_no" , title: "roomNo" , width: 50},
{ field: "room_type_name" , title: "roomName" , width: 40},
{ field: "room_status_name" , title: "roomStatusName" , width: 50},
{ field: "remark" , title: "remark" , width: 100}
]
});
如果按下“保存”按钮,我想将dataitem仅带到已选中网格中复选框的那些。
答案 0 :(得分:0)
一般解决方案:遍历复选框
` $("input[type=checkbox]").each(function(index,elem){
if(this.checked==true){
$(this).parent().parent()
//you can get tr element then get the data you want
}
});`
具体解决方案:阅读您使用的网格控件的文档;必须有一些方法来帮助您获取数据。