jqGrid get row data on select -
i need peices of data row on select, can send off. getting 'false' on teacher , student vars. teacherid id column grid.
onselectrow: function () { var $grid = $("#student-grid"); var rowdata = $grid.jqgrid('getrowdata', 'selrow'); var teacher = $grid.jqgrid('getcell', rowdata, 'teacherid'); var student = $grid.jqgrid('getcell', rowdata, 'studentid'); alert('student num is: ' + student + ' , teacher num is: ' + teacher); }
edit add more info:
colmodel: [ { name: 'studentid', index: 'studentid', key: false, hidden: true }, { name: 'teacherid', index: 'teacherid', key: true, hidden: true }, ... (other columns) ]
yes using loadonce: true , both using datatype json.
Comments
Post a Comment