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

Iexplore 7 Display Issue

9 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 16 Mar 2011, 02:49 PM

 

When my grid opens up in Iexpore 7 or 8 in compatibility mode it looks all squished.  It appears to be ignoring the widths I setup.  Anyone else see this?

9 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Mar 2011, 11:06 AM
Hello Gary,

If the parent element of RadGrid has a width/height specified in pixels, and RadGrid still does not expand, this means that it is ajaxified and the update panel's <div> element does not have a height set explicitly. If this is the case, please refer to:

http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx

All the best,
Pavlina
the Telerik team
0
Gary
Top achievements
Rank 1
answered on 21 Mar 2011, 05:59 PM
Thanks for the comment, but I do not think that is the issue.  This only happens in IE 7 and the Grid is the correct length, the headers are the correct width, but the items are not.  they are all shrunk and wrapped.  I have the widths set in the header and Item-style the same.

Gary
0
Pavlina
Telerik team
answered on 22 Mar 2011, 04:56 PM
Hi Gary,

Using ItemStyle-Width is not recommended. Please use only HeaderStyle-Width in order to specify column widths and let me know how it goes.

All the best,
Pavlina
the Telerik team
0
Gary
Top achievements
Rank 1
answered on 23 Mar 2011, 03:04 PM
Ok I removed them all and when it first loads it's fine, then the widths inside the gird shrink down.  Below is how i have it setup.  I have three other grids in this project that are not doing this, so it's really strange.

<telerik:RadGrid ID="RadGridAdd" runat="server" AutoGenerateColumns="False" 
                Skin="Windows7"  onneeddatasource="RadGridAdd_NeedDataSource" Height="400px"
                               onselectedindexchanged="RadGridAdd_SelectedIndexChanged" 
                >
                <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
               <PagerStyle AlwaysVisible="True" Position="TopAndBottom" />
               <MasterTableView HeaderStyle-Wrap="true" Width="100%" ItemStyle-Width="100%">
                   <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" 
                            HeaderText="Select" HeaderTooltip="Tag for Add New" Reorderable="False"
                           <HeaderStyle Wrap="True" Width="15px"></HeaderStyle>
                       </telerik:GridClientSelectColumn>
                   <telerik:GridBoundColumn  AllowFiltering="false" ReadOnly="true" 
                        Visible = "false" DataField="JobsID" HeaderText="JobsID"  UniqueName="JobsID" 
                        ForceExtractValue="InEditMode" AllowSorting="False" >
                   </telerik:GridBoundColumn>  
                   <telerik:GridBoundColumn  AllowFiltering="false" ReadOnly="true" AllowSorting="true" 
                        DataField="JobCode" HeaderText="JobCode"  UniqueName="JobCode"  
                        Resizable="true">
                       <HeaderStyle Wrap="True" Width="25px"></HeaderStyle>
                   </telerik:GridBoundColumn>  
                   <telerik:GridBoundColumn  AllowFiltering="true" ReadOnly="true" 
                        DataField="JobTitle" HeaderText="JobTitle"  UniqueName="JobTitle" AllowSorting="true"
                        Resizable="False">
                       <HeaderStyle Wrap="True" Width="50px"></HeaderStyle>
                   </telerik:GridBoundColumn
                   <telerik:GridBoundColumn  AllowFiltering="true" ReadOnly="true" 
                        DataField="JobDescription" 
                        HeaderText="Job Description"  UniqueName="JobDescription" 
                        Resizable="False">
                       <HeaderStyle Wrap="False" Width="200px"></HeaderStyle>
                   </telerik:GridBoundColumn
                   </Columns>
                     <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom"  />
                   <HeaderStyle Wrap="True"></HeaderStyle>
                </MasterTableView>
                <clientsettings enablepostbackonrowclick="True">
                    <selecting allowrowselect="True" />
                    <scrolling allowscroll="True" usestaticheaders="True" />
                </clientsettings>
           </telerik:RadGrid>
0
Pavlina
Telerik team
answered on 24 Mar 2011, 05:12 PM
Hi Gary,

To resolve the problem you are facing you should remove the following line from your code:
ASPX:
<HeaderStyle Wrap="True" Width="15px"></HeaderStyle>

Give it a try and let me know how it goes.

Greetings,
Pavlina
the Telerik team
0
Gary
Top achievements
Rank 1
answered on 25 Mar 2011, 02:36 PM
Ok i did and it reversed the problem, now my first column is stretched and the last three are smashed.
0
Pavlina
Telerik team
answered on 25 Mar 2011, 04:31 PM
Hi Gary,

The described behavior is expected, because you are not setting Width for the first column. However, I recommend that you review the forum thread below:
http://www.telerik.com/community/forums/aspnet/grid/best-practice-for-grid-and-column-widths.aspx

Kind regards,
Pavlina
the Telerik team
0
Gary
Top achievements
Rank 1
answered on 28 Mar 2011, 07:45 PM
Yes, but you just told me to remove it in the post above.

How do I set width
So I am confused:)
0
Pavlina
Telerik team
answered on 29 Mar 2011, 02:44 PM
Hello Gary,

If all columns have a fixed pixel width, then the sum of all widths must match the RadGrid width, otherwise due to the different way IE6/7 and all other browsers apply column widths, you will end up with inconsistent combination of RadGrid width and column widths. In such cases it is good to leave one column without a width (e.g. the last one), so that it can adjust automatically.

Regards,
Pavlina
the Telerik team
Tags
Grid
Asked by
Gary
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Gary
Top achievements
Rank 1
Share this question
or