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

Internet Explorer Column Resize When Large Field

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 15 Dec 2011, 01:03 PM
Hi,

This is an Internet Explorer only related issue, it doesn't happen in Firefox, and as such I don't know how to trouble-shoot it.

I have a MasterTable that contains a bunch of columns, a few of which have specific widths set. The columns are created dynamically using AutoGeneratedColumns, and the widths are set in the ColumnCreated procedure.

This MasterTable has two DetailTables, and I currently have two entries. The first one has only short amounts of data in it, and as such no column ever has more than one line of text in it. This one works absolutely fine, I can expand and collapse the DetailTables without any problems at all.

The second one has a Note that is about 500 characters long (the note in the previous one is 10 characters long). When I expand THIS detail table the MasterTableView loses all it's widths for the columns and they all become completely random widths, seemingly dependent on the content and not on the actual defined sizes. When I collapse it they return to normal.

While this isn't the biggest problem in the world it is incredibly annoying from a design point of view because I don't want the columns to randomly resize whenever one of the DetailTables happens to contain a stupidly long value that's too wide for the column it's in and has to be wrapped across two or more lines. I've tried a few things, like setting the e.Column.ItemStyle.Wrap = true, but that made no difference at all. I'm going to guess that Internet Explorer is screwing with it in a way that Firefox can cope with happily, and I'm going to assume there's either a CSS or Javascript solution to it that I'm not aware of.

Please see the attached screenshots if this isn't 100% clear. You'll note one doesn't have the detail tables expanded, one does but the line of data in the notes table is small enough that it only stays on one line, and in the other the note is so large it spans across four lines (which I tried to make obvious by using black and grey), and on that one the whole MasterTable shifts the column sizes randomly.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Pete
Top achievements
Rank 1
answered on 16 Dec 2011, 06:26 PM
Hi again,

Randomly browsing other topics and I found advice from somebody in another topic that fixed the issue.

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-column-alignment-issue-in-ie-9-in-visual-studio.aspx

Evidently setting the "MasterTableView.TableLayout = GridTableLayout.Fixed" stops it from doing the random resize, although I'd still love to know why it only seems to affect Internet Explorer (currently my office use IE8) and not Firefox. IE8 in compatibility mode also doesn't have the same issue.

Thanks anyway.
Tags
Grid
Asked by
Pete
Top achievements
Rank 1
Answers by
Pete
Top achievements
Rank 1
Share this question
or