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

How to change column width when using groupby

5 Answers 177 Views
Grid
This is a migrated thread and some comments may be shown as answers.
joni
Top achievements
Rank 1
joni asked on 30 Apr 2008, 03:12 PM
Hi,
I'm evaluating Telerik products and so far so good - but I have created  a web grid and and it is populated with a dataset.  There are 20 columns so i have it horizontally scroll (I wrapped it in a div and set the overflow to horizontal flow)- it looks great except when I drag a column to the group by header - then my table shrinks to the width with no scrolling and the columns are so narrow I can't read what is in them.
How can I make it so the grid retains it's scrolling ability and it's column widths?
Any help is appreciated. Thanks!

joni

5 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 May 2008, 08:30 AM
Hi joni,

Based on the information supplied, I suspect that the problem is related to the particular implementation at your end - perhaps with styles/widths applied. In order to further investigate the problem, it would be best if you open a formal support ticket, and send us a small working project, which demonstrates your setup, and displays the unwanted behavior. I will review it locally, and get back to you with my findings.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
joni
Top achievements
Rank 1
answered on 02 May 2008, 02:13 PM
Yavor,
Thanks for your response - it seems that the problem was the fixed header set to true.  If I set usefixedHeaders to false the columns will size correctly. I set it to false in the grid_groupschanging event if the action is type group - otherwise I set it to true. Is this normal behavior for groups - that you can use fixed headers? thanks!

Joni
0
Kiara
Top achievements
Rank 1
answered on 04 May 2008, 12:58 PM
Although I have not come upon such oddity when using scrolling, static headers and grouping, my lucky guess is to set TableLayout = Fixed for the master table in the grid to see whether this helps. A trustworthy method to detect what produces the unwanted effect is to inspect the html of the page using IE developer toolbar:

http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

The FF equivalent is FireBug if I remember well:

https://addons.mozilla.org/en-US/firefox/addon/1843

Kiara
0
MB
Top achievements
Rank 1
answered on 26 Aug 2008, 10:51 AM
I've got the exact same problem. When I use the combination UseStaticHeaders="True" and AllowScroll="True" the horizontal scrolling is fine until I group by any field.
Without the grouping the columns have a width property, but the grouping removes the width so that all columns get squashed into the table without any horizontal scrolling.
0
Kiara
Top achievements
Rank 1
answered on 26 Aug 2008, 11:00 AM
I suppose you tried the suggestions discussed previously and inspected the html of the page using IE dev toobar of FireBug. If this does not bring out any obvious reasons for the discrepancy, contact the Telerik team via the support system submitting a sample demo. They will probably be able to provide more definite answer.

Kiara
Tags
Grid
Asked by
joni
Top achievements
Rank 1
Answers by
Yavor
Telerik team
joni
Top achievements
Rank 1
Kiara
Top achievements
Rank 1
MB
Top achievements
Rank 1
Share this question
or