我是flexigrid的新手。任何人都可以讓我知道如何獲得每列值的選定行。flexigrid得到選定的行列值
如何獲得每個列名稱(reportName和reportDescription)?因爲我推/ /所有的數據進入數組,如下所述。
我使用下面的代碼來獲取選定的行。但它返回null。你能幫我一樣嗎?
//Column. <br/>
colModel: [
{ display: 'WidgetID', name: 'WidgetID', width: 50, sortable: true, align: 'left', hide: true },
{ display: 'Widget Name', name: 'WidgetName', width: 170, sortable: true, align: 'left' },
{ display: 'IsClientReport', name: 'IsClientReport', width: 50, sortable: false, align: 'left', hide: true },
{ display: 'ClientReportID', name: 'ClientReportID', width: 50, sortable: false, align: 'left', hide: true },
{ display: 'ReportType', name: 'ReportType', width: 280, sortable: true, align: 'left' }
],
$('#grid01').click(function(event){
$('.trSelected', this).each(function(){
console.log(' rowId: ' + $(this).attr('id').substr(3) + ' IsClientReport: ' + $('td[abbr="IsClientReport"] >div', this).html() + ' sign: ' + $('td[abbr="WidgetID"] >div', this).html() + ' ReportType: ' + $('td[abbr="ReportType"] >div', this).html());
});
});
感謝, PON庫馬爾Pandian
我使用下面的代碼來獲取選定的行。但它返回null。你能幫我一樣嗎? $('#grid01')。click(function(event){('。trSelected',this).each(function(){ console.log( 'rowId:'+ $(this).attr '')。substr(3)+ 'name:'+ $('td [abbr =「name」]> div',this).html()+ 'sign:'+ $('td [abbr =「sign」]> div',this).html()+ 'status:'+ $('td [abbr =「status」]> div',this).html() ); }); }); – 2012-08-17 06:51:19
我有同樣的問題,有人找出它嗎? – 2013-03-13 00:20:09