Author Topic: updateRow with dynamic row number  (Read 3620 times)

jubx

  • Newbie
  • *
  • Posts: 1
    • View Profile
updateRow with dynamic row number
« on: March 23, 2015, 09:35:38 pm »
I implemented the following function to update a row after a change:
 
Code: [Select]
  change: function (event, x) {
                    var value = Data.areas[0].label;
                    $grid.pqGrid("updateRow", { 'rowIndx': 2, row: { 'Area': value } });
                },

In the above situation I use the fixed rowIndx 2, but want to apply this function to the current row:

Code: [Select]
  change: function (event, x) {
                    var value = Data.areas[0].label;
                    var current_row = ui.rowIndx;
                    $grid.pqGrid("updateRow", { 'rowIndx': current_row , row: { 'Area': value } });
                },

It doesn't seems to work, even when  console.log(ui.rowIndx); gives me the correct row number.