Author Topic: Hide column by dataIndx  (Read 1882 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Hide column by dataIndx
« on: November 15, 2016, 03:30:23 pm »
Is it possible to hide column by dataIndx?
Instead of using index:

Code: [Select]
colModel[0].hidden = true;
Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Hide column by dataIndx
« Reply #1 on: November 15, 2016, 03:46:21 pm »
Yes, in that case get reference to column with getColumn method.

Code: [Select]
  grid.getColumn({ dataIndx: 'dataIndx of column' }).hidden = true;

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