RadGrid static headers with IE

4 posts, 0 answers
  1. Emanuele
    Emanuele avatar
    9 posts
    Member since:
    Sep 2011

    Posted 15 Feb 2013 Link to this post

    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>
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 19 Feb 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    3 posts
    Member since:
    Oct 2013

    Posted 17 Oct 2013 Link to this post

    This fixed my header alignment too "Width="100%" for TableMasterView.

    Thank You!
  5. KidSysco
    KidSysco avatar
    10 posts
    Member since:
    Aug 2013

    Posted 21 Aug 2015 Link to this post

    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!

Back to Top