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

Grid Header style reset issue

5 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gayathri
Top achievements
Rank 1
Gayathri asked on 29 Jul 2013, 03:01 PM
When 'postback' event is triggered in a page, rad grid header style is reset. What could be the cause of this issue and how to fix it?
aspx code
<asp:UpdatePanel UpdateMode="Always" ID="upGridConfig" runat="server">
                                        <ContentTemplate>
                                            <asp:HiddenField ID="hdnId" runat="server" />
                                            <asp:HiddenField ID="hdnTowerNo" runat="server" />
                                            <telerik:RadGrid ID="gridWindTurbines" ViewStateMode="Enabled" AllowPaging="true"
                                                AllowMultiRowSelection="false" AllowSorting="true" OnPageIndexChanged="gridWindTurbines_PageIndexChanged"
                                                OnNeedDataSource="gridWindTurbines_NeedDataSource" AutoGenerateColumns="false"
                                                AllowAutomaticInserts="true" GridLines="Horizontal" ClientSettings-EnableRowHoverStyle="true"
                                                OnItemDataBound="gridWindTurbines_ItemDataBound" EnableAjaxSkinRendering="false"
                                                MasterTableView-RowIndicatorColumn-ItemStyle-BorderColor="ActiveBorder" Height="264px"
                                                 runat="server">
                                                <ClientSettings Scrolling-AllowScroll="true" Selecting-AllowRowSelect="true" Scrolling-UseStaticHeaders="true"
                                                    Selecting-UseClientSelectColumnOnly="true">
                                                    <ClientEvents OnRowSelecting="enablelink" OnRowDeselecting="disablelink" />
                                                </ClientSettings>
                                                <MasterTableView AllowPaging="true" DataKeyNames="NAME,OBJID,MODEL,POWER" Visible="true"
                                                    Width="100%" TableLayout="Fixed" EnableViewState="true" HeaderStyle-HorizontalAlign="Center"
                                                    ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center"
                                                    ClientDataKeyNames="NAME,OBJID">
                                                    <Columns>
                                                        <telerik:GridClientSelectColumn UniqueName="CHK" ItemStyle-HorizontalAlign="Center"
                                                            HeaderStyle-Width="5%">
                                                        </telerik:GridClientSelectColumn>
                                                        <telerik:GridBoundColumn DataField="OBJID" HeaderStyle-Font-Bold="true" Visible="false"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="NAME" HeaderStyle-Font-Bold="true" HeaderText="WTG"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="MODEL" HeaderText="TYPE" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="25%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn UniqueName="POWER" SortExpression="POWER" HeaderStyle-Font-Bold="true"
                                                            HeaderText="POWER">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LblPower" runat="server" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="PLCCount" HeaderText="#PLC" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="CCUCount" HeaderText="#CCU" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="SMPCount" HeaderText="#SMP" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DASCount" HeaderText="#DAS" HeaderStyle-Font-Bold="true"
                                                            HeaderStyle-Width="10%">
                                                        </telerik:GridBoundColumn>
                                                    </Columns>
                                                    <HeaderStyle CssClass="GridHeader" />
                                                </MasterTableView>
                                                <PagerStyle Mode="NextPrevAndNumeric" VerticalAlign="Bottom" Position="Bottom" AlwaysVisible="true" />
                                            </telerik:RadGrid>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>

5 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 01 Aug 2013, 01:41 PM
Hi Gayathri,

I was able to replicate the issue with your RadGrid settings and I can confirm that this is a bug with the version you are using.

The issue has already been fixed and an internal build with the fix should be released and available for download on Aug 6, 2013.

As a workaround for now I could suggest you set custom page sizes to the PageSizes property (since I was able to reproduce this behavior only when page size is less or equal to 11) and change the initial PageSize to be higher than 11. Please try the following markup and see if it fixes the issue on your side:
<telerik:RadGrid ID="gridWindTurbines" ViewStateMode="Enabled" AllowPaging="true"
    AllowMultiRowSelection="false" AllowSorting="true" OnPageIndexChanged="gridWindTurbines_PageIndexChanged"
    AutoGenerateColumns="false" OnNeedDataSource="gridWindTurbines_NeedDataSource"
    AllowAutomaticInserts="true" GridLines="Horizontal" ClientSettings-EnableRowHoverStyle="true"
    OnItemDataBound="gridWindTurbines_ItemDataBound" EnableAjaxSkinRendering="false" Height="264px"
    runat="server" PageSize="15">
    <ClientSettings Scrolling-AllowScroll="true" Selecting-AllowRowSelect="true" Scrolling-UseStaticHeaders="true"
        Selecting-UseClientSelectColumnOnly="true">
        <ClientEvents />
    </ClientSettings>
    <MasterTableView AllowPaging="true" DataKeyNames="NAME,OBJID,MODEL" Visible="true"
        Width="100%" TableLayout="Fixed" EnableViewState="true" HeaderStyle-HorizontalAlign="Center"
        ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center"
        ClientDataKeyNames="NAME,OBJID">
        <PagerStyle Mode="NextPrevAndNumeric" PageSizeLabelText="Page Size: " PageSizes="15, 20, 50" />
...

Hope that helps.
 
Regards,
Konstantin Dikov
Telerik
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 the blog feed now.
0
Gayathri
Top achievements
Rank 1
answered on 02 Aug 2013, 10:25 AM
Hi,

We are using rad grid version 2011.1.519.40. We are not able to find the property PageSizes property in PagerStyle as below

<PagerStyle Mode="NextPrevAndNumeric" PageSizeLabelText="Page Size: " PageSizes="15, 20, 50" />

Our requiremnt is to have 10 as default page size. Please let us know if there is any other fix for this.

Thanks.

0
Konstantin Dikov
Telerik team
answered on 05 Aug 2013, 02:44 PM
Hi Gayathri,

The "PageSizes" property of the PagerStyle in the RadGrid is presented with Q2 2012 (version 2012.2.607). Unfortunately, there is no workaround available for the version you are using.

As I said in my previous post, the issue has already been fixed and an internal build with that fix should be released and available for download on Aug 6, 2013.
 
Regards,
Konstantin Dikov
Telerik
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 the blog feed now.
0
Gayathri
Top achievements
Rank 1
answered on 09 Apr 2014, 10:57 AM
Hi ,

I am still facing the issue please let me know how to fix the Grid Header Alignment Issue.
Use of Static Header in grid is must in our application. And this happens for a second and becomes normal.
I have checked the issue with the below telerik dll's

Telerik.Web.UI.dll - 2013.1.305.40
Telerik.Web.Design.dll - 2013.1.305.40
Telerik.Web.UI.Skins.dll - 2013.1.305.40

Please find the attached file .

0
Konstantin Dikov
Telerik team
answered on 09 Apr 2014, 11:55 AM
Hello Gayathri,

The version you are testing with (2013.1.305.40) is before the version with the fix for that issue. The earliest version where the fix is introduced is the internal build 2013.2 806, so please upgrade to that (or later) version and see if everything is working correctly.

I could also recommend that you test with our latest version, released last week (2014 Q1 SP1).

Please let me know how your application behaves after the upgrade.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Gayathri
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Gayathri
Top achievements
Rank 1
Share this question
or