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

Resize column programmatically

3 Answers 2292 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 21 Apr 2015, 04:09 PM
How can we set a grid column width programmatically (after the grid initialization)?
Shakthipriyan
Top achievements
Rank 1
commented on 13 Jun 2024, 03:01 PM

Is there any update for setting grid column programatically without reload of grid.

Requirement: Save the user preference of grid column width(Kendo Checkbox Grid) and on re-render display same width.

3 Answers, 1 is accepted

Sort by
0
Accepted
Ryan
Top achievements
Rank 1
answered on 21 Apr 2015, 05:19 PM
0
Simon
Top achievements
Rank 1
answered on 21 Apr 2015, 06:49 PM
Thanks!  It's working!
0
Chris
Top achievements
Rank 1
answered on 19 Jul 2017, 05:10 PM

I would not recommend doing this to resize columns. I did this in my project at work and it caused filter logic to stop working on the kendo grid. This is due to the fact that calling setOptions rebinds the grid (http://www.telerik.com/forums/loading-grid-options-causes-an-error-when-calling-todatasourceresult).

I would recommend using JQuery and CSS as shown here: http://www.telerik.com/forums/resizing-column-dynamically

 

Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Simon
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Share this question
or