Author Topic: updateRow could not update cells in grid  (Read 218 times)

hyh888

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 145
    • View Profile
updateRow could not update cells in grid
« on: July 18, 2025, 01:50:08 pm »
Dear Team,
               for (let key in data) {
                        ui.rowData[key] = data[key];
                }
When using pqgrid v9,   I found that this program can update cells in grid( some data in fields of ui.rowData has been changed with program above ):             $grid.pqGrid("refreshRow",{rowIndx:ui.rowIndx});
but using following program, cells could not be updated.
               $grid.pqGrid("updateRow",{
                    rowIndx: ui.rowIndx,
                    newRow: ui.rowData,
                    checkEditable:false,
                    refresh: true
                });
 Would you like to provide any advice?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6411
    • View Profile
Re: updateRow could not update cells in grid
« Reply #1 on: July 18, 2025, 03:07:39 pm »
this is incorrect: ui.rowData can't be passed as newRow param of updateRow method.

Create a new object {} containing only the changes to pass it as newRow param.

Please check the documentation:

https://paramquery.com/pro/api#method-updateRow