Author Topic: Customization on PQgrid  (Read 2865 times)

supriya.khamesra

  • Newbie
  • *
  • Posts: 12
    • View Profile
Customization on PQgrid
« on: December 22, 2017, 07:23:31 pm »
I am using PQ grid and need to carry out below customization:

1.Make the grid editable on the basis of a condition. I have used $( ".selector" ).pqGrid( "option", "editable", false ); command after load but able to edit the grid columns.
2. Having 3 three grids on a page and show and hide a grid on the basis of a condition.
3.When I am creating the grids one after the other using a function call getting error like Unable to get property 'style' of undefined or null reference in pqgrid.min.js at a method where setting the height.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6210
    • View Profile
Re: Customization on PQgrid
« Reply #1 on: December 22, 2017, 09:44:53 pm »
1. $( ".selector" ) in $( ".selector" ).pqGrid( "option", "editable", false ); should be substituted with actual selector of the grid.

2. Toggle css rule display: none

3. Please share your implementation code ( through plnkr if possible ).

supriya.khamesra

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Customization on PQgrid
« Reply #2 on: December 23, 2017, 11:52:24 pm »
Thanks for the quick response.
I am able to resolve points 1 and 2.
For point 3 : I am loading the grid data using a url remotely and calling the multiple grid creation methods one after the other and the datamodel is created later as it is asynchronous call. Can this may cause the error I am getting. As I tried to create the grids with hard coded data and it was not throwing any error.

I have one more query.

I am showing one grid at a time. Now on some filter I want to reload the same grids with new data. I am not able to load all the grids with new data. Only the grid which was set visible at the time of filter selection shows the data and rest are not loaded. I used below command to destroy and reload.
  if ($("#grid").pqGrid("instance")) { $("#grid").pqGrid("destroy"); }

Please help in resolving these issues.