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

Hide grid column client-side, can other columns automatically resize

3 Answers 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Pye
Top achievements
Rank 1
Brian Pye asked on 05 Nov 2010, 04:08 PM
I'm using a RadGrid, and I'm able to show and hide columns using client-side script:

 

mygrid.get_masterTableView().hideColumn(i);

But, when I hide the column, it leaves a blank space where the column was located. Is it possible to have the remaining columns automatically resize and fill the empty space?

If this isn't possible, can I manually resize the remaining columns? I've tried the following script to set the hidden column width to zero, but it doesn't have any affect:

mygrid.get_masterTableView().resizeColumn(i, 0);

3 Answers, 1 is accepted

Sort by
0
Brian Pye
Top achievements
Rank 1
answered on 05 Nov 2010, 05:19 PM
I just realized that I get the desired behavior when I run in Firefox 3.6.12 or IE7. That is, the remaining visible columns automatically resize to fill the grid when I hide a column. No manual resizing of columns is required. It's only IE8 that I'm having this problem, which is our primary target browser.
0
Mira
Telerik team
answered on 10 Nov 2010, 11:18 AM
Hello Brian,

I tried to replicate the issue which you described, but to no avail.
Attached to this message, you will find the code which I used for testing.

Please, take a look at it and let me know if there are any differences at your end, which I may be leaving out.

Kind regards,
Mira
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Sophie
Top achievements
Rank 2
answered on 04 Mar 2013, 04:55 PM
Hello i asked a similar question here http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-column-select-deselect-does-not-resize-grid.aspx#2516850

What i found is if i set the ClipCellContentOnResize="false", everything is fine. I was wondering if this was a bug.
Tags
Grid
Asked by
Brian Pye
Top achievements
Rank 1
Answers by
Brian Pye
Top achievements
Rank 1
Mira
Telerik team
Sophie
Top achievements
Rank 2
Share this question
or