Author Topic: Skip columns from the grid data  (Read 2464 times)

Ekanta

  • Newbie
  • *
  • Posts: 17
    • View Profile
Skip columns from the grid data
« on: August 25, 2016, 11:09:23 am »
Hi All,

In our application we have a grid with check box as first column. When we save the data we are allowing only the selected rows from the check box. When we get the selected rowdata from the grid the Json data contains the check box value also. But we dont want to send the check box value to server as I am not saving it to the database.

So is there is a way to skip the columns when we get the row data from the grid.

Regards,
Ekanta

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Skip columns from the grid data
« Reply #1 on: August 25, 2016, 03:20:35 pm »
Which version of pqgrid is that and how do you get the selected rowdata from grid as json data.

When tracking is enabled, getChanges() method in the API doesn't include the checkbox row selection fields.

http://paramquery.com/pro/api#method-getChanges

---------------

However if you are manually collecting the changes from grid, you could skip the undesired fields manually too.

Code: [Select]
  delete rowData[ undesired field name ];
« Last Edit: August 25, 2016, 03:38:05 pm by paramquery »

Ekanta

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Skip columns from the grid data
« Reply #2 on: August 25, 2016, 10:18:05 pm »
Thank you very much.This worked for me  :)