Author Topic: savestate column order not saving/rendering when column grouping applied  (Read 459 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
saveState and loadState work fine when column grouping is not applied, but when I have a column grouping, the column order (of non-grouped columns) does not get applied. Is there a good way to deal w/this or do I need to remove column grouping?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Column order via loadState is not supported for grouped columns currently.

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
thank you for confirming.

I will remove the column group. Is it possible to set background color for column headers to help distinguish them.
or
Is it possible to read the column order from the grid state and apply this order once gridstate (with the column grouping) has been applied.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Yes it's possible to set background color or assign any style to column header cells with column.styleHead option.

https://paramquery.com/pro/api#option-column-styleHead

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Is the column order via loadState still not supported for grouped columns? User's love the ability to save column order and love column grouping.
Could you recommend an approach to apply both?
Is it possible to read the grid's loadState and get its column ordering and then add the columns in that order to the grid's column collection based on what's in LoadState?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
I understand your requirement, have added it to the roadmap.