Getting and setting pinned columns

Posted by: gibbonsk on 11 May 2020, 3:12 pm EST

  • Posted 11 May 2020, 3:12 pm EST

    I have a FlexGrid that allows users to pin single columns or column ranges (using AllowPinning.Both). The columns in the grid can vary depending on certain user parameters. I have noticed that if a user pins a couple columns and then the parameters change, thus resetting or changing the columns, the pinning gets messed up.

    What I’d like to do is query the columns before changes are made to get an array of pinned columns, and then re-apply those pins after the columns have been set. But from what I have gathered from the documentation there is no way to of getting or setting pinned values on individual columns. So that raises two questions:

    1. Is there a way of determining which columns are currently pinned? I’d love a getIsPinned method on the Column object.
    2. Is there a way of setting a column as pinned (other than using “frozenColumns” which sets a range starting at zero)? Again, I’d love a setPinned() method on the Column object for things like this.

    Thank you.

  • Posted 12 May 2020, 2:55 am EST

    Hi Kalen,

    I have forwarded an enhancement for this to the developers with internal tracking id 434864. I will update you once I will hear from them.

    In the meantime, you can get whether a current column is pinned or not by using the isFrozen method of ColumnCollection class:

    flexGrid.columns.isFrozen(1) // column index 
    

    https://www.grapecity.com/wijmo/api/classes/wijmo_grid.columncollection.html#isfrozen

    Unfortunately, the frozenColumns is currently the only to set a column as pinned.

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels