0

We are using JqxGrid with Knockout.js.

A button "Delete" is bound with each row in a grid.

and using the following code to delete a row:

     var  DeleteReportRecord = function  () {
            var  rows = $('#jqxgrid').jqxGrid('getrows');

            var  selectedrowindex = $("#jqxgrid").jqxGrid('getselectedrowindex');
            var  dataRecord = $("#jqxgrid").jqxGrid('getrowdata', selectedrowindex);
            var  ReportId = dataRecord.ReportId;
            selectedRow = rows[selectedrowindex];
           $("#jqxgrid").jqxGrid('deleterow', selectedrowindex, selectedRow);
}

The problem is that it is working properly and deleting the row, but it is giving an warning in IE as "rowdata is undefined" My server is using jquery 1.71 and jqxgrid is using jquery 1.8.1 where the code is given as :

$("#jqxgrid").jqxGrid('deleterow', selectedrowindex);

if I could use the above line the delete does not work. Can anybody help on this ?

Thanks Anirban Ghosh

tpeczek
  • 23,867
  • 3
  • 74
  • 77
Anirban Ghosh
  • 125
  • 2
  • 14

2 Answers2

0

Please see if this is of help http://www.jqwidgets.com/community/topic/rowdata-is-undefined/

CodeMad
  • 950
  • 2
  • 12
  • 30
0

'deleterow' expects a row id, not index. See here: createremoveupdatedata.htm

scripto
  • 2,297
  • 1
  • 14
  • 13