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

RadGrid static headers with IE

5 Answers 155 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Emanuele
Top achievements
Rank 1
Emanuele asked on 15 Feb 2013, 08:03 AM
Hello, I have an issue with radgrid static headers runing on IE compatibility mode, any solution?

<
telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" runat="server">
    <ClientSettings>
        <Scrolling AllowScroll="true" ScrollHeight="500" UseStaticHeaders="true" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" runat="server">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="IdProvincia" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="Provincia" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridBoundColumn DataField="Airport" HeaderText="Provincia" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LAT" HeaderText="LAT" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LNG" HeaderText="LNG" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LAT" HeaderText="LAT" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LNG" HeaderText="LNG" ItemStyle-Width="100px" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 19 Feb 2013, 08:08 PM
Hello Emanuele,

I suggest you set Width="100%" for MasterTableView and remove ItemStyle-Width property from grid declaration and see if this helps to resolve the problem in Compatibility view. Keep in mind that you should use only HeaderStyle-Width for setting column widths.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Steve
Top achievements
Rank 1
answered on 17 Oct 2013, 04:54 PM
This fixed my header alignment too "Width="100%" for TableMasterView.

Thank You!
0
KidSysco
Top achievements
Rank 1
answered on 21 Aug 2015, 01:44 PM

Setting the MasterTableView Width to 100% has worked great for my RadGrid controls that are using static headers in Internet Explorer 9, 10, and 11 Compatibility Mode.

This does not cause any issues with other browsers like modern versions of Chrome or FireFox either.

This is an awesome fix that has had me stumped for nearly 3 years. I had fought this problem and fought it in so many ways, using all of the browser tricks, forcing IE into different modes using meta tags, http headers, and developer tools.

Therefore, I have clearly re-worded this fix again in this post to further help the search engines.

This is going to help someone out there and make them very happy!

0
Joe
Top achievements
Rank 1
answered on 14 Feb 2017, 02:49 PM
So if the value isn't defined then why can't it be defaulted to 100%.  Where is the programmer in the room?
0
KidSysco
Top achievements
Rank 1
answered on 14 Feb 2017, 03:29 PM
That is a fine idea that would be good for everyone including Telerik...I wish you luck on that one!
Tags
General Discussions
Asked by
Emanuele
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Steve
Top achievements
Rank 1
KidSysco
Top achievements
Rank 1
Joe
Top achievements
Rank 1
Share this question
or