Author Topic: how to hide column on hit Excel export  (Read 1791 times)

sshede

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 41
    • View Profile
how to hide column on hit Excel export
« on: November 20, 2020, 12:35:30 pm »
 how to hide column on hit Excel export

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: how to hide column on hit Excel export
« Reply #1 on: November 20, 2020, 02:44:41 pm »
Please use Columns().hide() API

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

sshede

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: how to hide column on hit Excel export
« Reply #2 on: November 20, 2020, 04:31:32 pm »
Thanks to replay but you can give me example. i want column hide in exls also

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: how to hide column on hit Excel export
« Reply #3 on: November 23, 2020, 09:51:33 am »
Any columns hidden in the grid before method call to export to Excel are hidden in exported Excel too.

Example of Usage of Columns().hide():

Below code hides columns with dataIndx: 'ShipCountry' and  'ShipVia'

Code: [Select]
grid.Columns().hide({
    diHide: ['ShipCountry', 'ShipVia']
}
//now export to Excel.
grid.exportExcel()