Thursday, 5 September 2013

how to get selected rows of master table and child table in jtable

how to get selected rows of master table and child table in jtable

here I am trying to write like this..
but it doesn't work for me..
pls help..
function CheckForm() {
var $selectedRows = $('#PersonTableContainer').jtable('selectedRows');
// var $selectedChildRows =
$('.jtable-child-table-container').jtable('selectedRows');
var myjson = [];
$selectedRows.each(function () {
var record = $(this).data('record');
myjson.push({
rcid: record.rcid,
rdsid: record.rdsid
});
});
$('jsondata').val(JSON.stringify(myjson)); // this will encode in a
json string
alert(JSON.stringify(myjson));
return false;
}

No comments:

Post a Comment