This is a migrated thread and some comments may be shown as answers.

Changing the FrozenColumnsCount dynamically

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 10 Aug 2015, 01:15 PM
We have a scenario, with a batch-mode grid page, that is inserted into multiple pages (via an IFrame) on the site.  Depending upon the containing page, the grid will show different (but related) columns.  In most cases, we have the grid freeze the first three columns ​which works fine.  However, in a two cases, the frozen columns are hidden and horizontal scrolling is not necessary.  As such, we would like to simply remove the FrozenColumnsCount (or possibly just set it to 0?).  How can I do this using both client-side and code-behind code?

2 Answers, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 10 Aug 2015, 01:35 PM
Well, the code-behind was easy:

RadGrid.ClientSettings.Scrolling.FrozenColumnsCount = 3;


 
0
Eyup
Telerik team
answered on 12 Aug 2015, 02:12 PM
Hi Mike,

You can check the sample provided in the following code-library to see how you can modify the frozen columns count on client-side:
http://www.telerik.com/support/code-library/add-dynamic-pin-unpin-option-to-freeze-radgrid-columns-for-static-scrolling

Hope this helps.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or