Author Topic: grid.Columns().hide() question  (Read 2197 times)

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
grid.Columns().hide() question
« on: December 12, 2018, 12:39:28 am »

I came across this documentation, where cols can be manipulated.  If export is clicked I would like certain cols to be always exported even though they are not visible.

I would like to always have columns 'Id' and 'Updated' exported, so I am trying to make it visible so they will get exported.
I am not sure how I need to pass parameters to this:

I am trying to do something like this. --- Need help here.
 this.Columns().hide("diShow", ["Id", "Updated"]);


It is giving me error.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: grid.Columns().hide() question
« Reply #1 on: December 12, 2018, 07:27:53 am »
Correct syntax is

Code: [Select]
this.Columns().hide(
  { diShow: ["Id", "Updated"] }
);

where this is reference to grid instance.

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: grid.Columns().hide() question
« Reply #2 on: December 12, 2018, 10:16:01 am »
Thank you!