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

[Solved] Problem with freezing column in dynamically created grid

4 Answers 272 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Binod
Top achievements
Rank 1
Binod asked on 09 Mar 2010, 01:13 PM

Hi Telerik

I am creating and grouping grid dynamically (refer 1.jpg  attached image here). In this grid I need to freeze first one or two columns. This I can achieve using below code.

<ClientSettings>

    <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"

     AllowScroll="True" />

</ClientSettings>

 

 But when I am scrolling to last then I surprised. Because some of last columns are not being visible completely (refer 2.jpg).

At the same time another problem is, the Column freezing is not working for other grid which is in other tab (refer 3.jpg and 4.jpg). Even all the grids I am binding together at a time.

 

Please help me to sort out this problem.

4 Answers, 1 is accepted

Sort by
0
Sudhanva
Top achievements
Rank 1
answered on 10 Mar 2010, 10:47 AM
Hello All,

I am also facing the same problem. The version which we are using is RadControls for ASPNET AJAX Q1 2009.

Is there any solution? Guys i am waiting for the reply.

Please help!!!!

Regards,
Sudhanva
0
Accepted
Pavlina
Telerik team
answered on 10 Mar 2010, 01:51 PM
Hello,

Can you please check whether setting fixed widths for your grid columns (through their HeaderStyle -> Width property) and TableLayout = Fixed for the master table makes a difference? Note that the default table layout for the grid with scrolling enabled is auto and this may cause the frozen columns functionality not working properly.

In order to display all columns when using frozen columns you should increase the Header Style Width of the last column in RadGrid. Thus you should be able to navigate to the leftmost column as expected to see the information in it.
Additionally, please note that you should consider the number of frozen columns with the width of the last column in the RadGrid control.

I hope this information helps.

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Binod
Top achievements
Rank 1
answered on 11 Mar 2010, 10:30 AM
Hi Telerik

thanks a lot for your reply..

the way you suggested i tried it and it's working but the second problem is still there. Grids which are in other tab for those columns are not freezing. for your reference i am pasting grid design code here. (Refer image 3.jpg and 4.jpg from my earlier post). all the grids here are binded at a time.

                                     

 <tr>   
 
                                            <td style="background-repeat: repeat-x;">   
 
                                                <telerik:RadTabStrip OnTabDataBound="rtsMrktStat_TabDataBound" OnTabCreated="rtsMrktStat_TabCreated"   
 
                                                    OnClientTabSelected="OnClientTabSelected" ID="rtsMrktStat" runat="server" Skin="Office2007"   
 
                                                    SelectedIndex="0" MultiPageID="RadMultiPageMain" UnSelectChildren="True" Font-Names="Verdana"   
 
                                                    Width="100%">   
 
                                                    <Tabs>   
 
                                                        <telerik:RadTab Value="Healthcare Landscape" Text="Healthcare Landscape" Font-Size="11px"   
 
                                                            ToolTip="Healthcare Landscape" Font-Names="Verdana" Selected="True">   
 
                                                            <Tabs>   
 
                                                                <telerik:RadTab Value="Demographics" Text="Demographics" Font-Size="11px" ToolTip="Demographics"   
 
                                                                    Font-Names="Verdana" PageViewID="Demographics" Selected="True">   
 
                                                                </telerik:RadTab>   
 
                                                                <telerik:RadTab Value="DiseaseStatistics" Font-Size="11px" Text="Disease Statistics"   
 
                                                                    ToolTip="Disease Statistics" Font-Names="Verdana" PageViewID="DiseaseStatistics">   
 
                                                                </telerik:RadTab>   
 
                                                                <telerik:RadTab Value="Payors" Text="Payors" Font-Size="11px" ToolTip="Payors" Font-Names="Verdana"   
 
                                                                    PageViewID="Payors" Selected="True">   
 
                                                                </telerik:RadTab>   
 
                                                                <telerik:RadTab Value="Providers" Text="Providers" Font-Size="11px" ToolTip="Providers"   
 
                                                                    Font-Names="Verdana" PageViewID="Providers">   
 
                                                                </telerik:RadTab>   
 
                                                                <telerik:RadTab Font-Names="Verdana" Visible="false">   
 
                                                                    <TabTemplate>   
 
                                                                        <div style="text-align: right; width: 470px; padding-top: 5px;">   
 
                                                                            <img style="cursor: hand" runat="server" onclick="onAddNewImageButtonClick();" alt="Add Other"   
 
                                                                                title="Add/Edit Other category" id="imgAddOther_Demo1" src="Images/AddOther.gif"   
 
                                                                                visible="false" /></div>   
 
                                                                    </TabTemplate>   
 
                                                                </telerik:RadTab>   
 
                                                            </Tabs>   
 
                                                        </telerik:RadTab>   
 
                                                        <telerik:RadTab Value="Market & Brand Performance" Font-Size="11px" Text="Market & Brand Performance"   
 
                                                            ToolTip="Market & Brand Performance" Font-Names="Verdana">   
 
                                                            <Tabs>   
 
                                                                <telerik:RadTab Selected="True" Value="Brand Performance" Font-Size="11px" Text="Brand Performance"   
 
                                                                    ToolTip="Brand Performance" Font-Names="Verdana" PageViewID="MarketBrandPerformance">   
 
                                                                </telerik:RadTab>   
 
                                                            </Tabs>   
 
                                                        </telerik:RadTab>   
 
                                                    </Tabs>   
 
                                                </telerik:RadTabStrip>   
 
                                            </td>   
 
                                        </tr>   
 
                                        <tr>   
 
                                            <td>   
 
                                                <telerik:RadMultiPage BackColor="#CCDBEE" ID="RadMultiPageMain" runat="server" SelectedIndex="0">   
 
                                                    <telerik:RadPageView runat="server" ID="Demographics">   
 
                                                        <telerik:RadSplitter ID="rsMrktStat_Demo" runat="server" Skin="Telerik" Font-Names="Verdana"   
 
                                                            BorderSize="0" Width="930px" Height="390px">   
 
                                                            <telerik:RadPane Height="390px" Scrolling="None" ID="RadpaneSlider" runat="server">   
 
                                                                <div runat="server" id="divGridNoDataMsg_Demo" visible="false" style="background-color: White;   
 
                                                                    text-align: center; padding: 10px; line-height: 18px"> 
 
                                                                    <asp:Label ID="lblparameters" Font-Names="Verdana" runat="server" Font-Size="10pt"   
 
                                                                        Text="XXXXX."></asp:Label><br />   
 
                                                                </div>   
 
                                                                <telerik:RadGrid Height="390px" ShowFooter="false" ID="rgMrktStat_Demo"   
 
                                                                    runat="server" Skin="Outlook" AutoGenerateColumns="false">   
 
                                                                    <ClientSettings>   
 
                                                                        <Scrolling FrozenColumnsCount="0" SaveScrollPosition="true" UseStaticHeaders="true"   
 
                                                                            AllowScroll="True" />   
 
                                                                    </ClientSettings>   
 
                                                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" Font-Bold="true" Font-Size="10px"   
 
                                                                        Font-Names="Verdana"></HeaderStyle>   
 
                                                                    <MasterTableView AutoGenerateColumns="false" EnableColumnsViewState="false"   
 
                                                                        CellSpacing="-1">   
 
                                                                        <GroupByExpressions>   
 
                                                                            <telerik:GridGroupByExpression>   
 
                                                                                <GroupByFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="Category2Name" />   
 
                                                                                </GroupByFields>   
 
                                                                                <SelectFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="Category2Name" HeaderText=" " HeaderValueSeparator="" />   
 
                                                                                </SelectFields>   
 
                                                                            </telerik:GridGroupByExpression>   
 
                                                                        </GroupByExpressions>   
 
                                                                        <Columns>   
 
                                                                        </Columns>   
 
                                                                    </MasterTableView>   
 
                                                                </telerik:RadGrid>   
 
                                                            </telerik:RadPane>   
 
                                                        </telerik:RadSplitter>   
 
                                                    </telerik:RadPageView>   
 
                                                    <telerik:RadPageView ID="DiseaseStatistics" runat="server">   
 
                                                        <telerik:RadSplitter ID="rsDP" runat="server" Skin="Telerik" Font-Names="Verdana"   
 
                                                            BorderSize="0" Width="930px" Height="390">   
 
                                                            <telerik:RadPane Height="390px" Scrolling="None" ID="Radpane1" runat="server">   
 
                                                                <div runat="server" id="divGridNoDataMsg_DS" visible="false" style="background-color: White;   
 
                                                                    text-align: center; padding: 10px; line-height: 18px"> 
 
                                                                    <asp:Label ID="Label1" Font-Names="Verdana" runat="server" Font-Size="10pt" Text="XXXXX"></asp:Label><br />   
 
                                                                </div>   
 
                                                                <telerik:RadGrid ShowFooter="false" Width="930px" Height="390px" ID="rgMrktStat_DS"   
 
                                                                    runat="server" Skin="Outlook" AutoGenerateColumns="false">   
 
                                                                    <ClientSettings>   
 
                                                                        <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"   
 
                                                                            AllowScroll="True" />   
 
                                                                    </ClientSettings>   
 
                                                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" Font-Bold="true" Font-Size="10px"   
 
                                                                        Font-Names="Verdana"></HeaderStyle>   
 
                                                                    <MasterTableView Width="930px" AutoGenerateColumns="false" EnableColumnsViewState="false"   
 
                                                                        CellSpacing="-1">   
 
                                                                        <Columns>   
 
                                                                        </Columns>   
 
                                                                        <GroupByExpressions>   
 
                                                                            <telerik:GridGroupByExpression>   
 
                                                                                <GroupByFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="DiseaseName" />   
 
                                                                                </GroupByFields>   
 
                                                                                <SelectFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="DiseaseName" HeaderText=" " HeaderValueSeparator="" />   
 
                                                                                </SelectFields>   
 
                                                                            </telerik:GridGroupByExpression>   
 
                                                                        </GroupByExpressions>   
 
                                                                    </MasterTableView>   
 
                                                                </telerik:RadGrid></telerik:RadPane>   
 
                                                        </telerik:RadSplitter>   
 
                                                    </telerik:RadPageView>   
 
                                                    <telerik:RadPageView runat="server" ID="Payors">   
 
                                                        <telerik:RadSplitter ID="rsMrktStat_Payers" runat="server" Skin="Telerik" Font-Names="Verdana"   
 
                                                            BorderSize="0" Width="930px" Height="390px">   
 
                                                            <telerik:RadPane Height="390px" Scrolling="None" ID="Radpane2" runat="server">   
 
                                                                <div runat="server" id="divGridNoDataMsg_Payers" visible="false" style="background-color: White;   
 
                                                                    text-align: center; padding: 10px; line-height: 18px"> 
 
                                                                    <asp:Label ID="Label2" Font-Names="Verdana" runat="server" Font-Size="10pt" Text="XXXXXX"></asp:Label><br />   
 
                                                                </div>   
 
                                                                <telerik:RadGrid ShowFooter="false" Width="930px" Height="390px" ID="rgMrktStat_Payers"   
 
                                                                    runat="server" Skin="Outlook" AutoGenerateColumns="false">   
 
                                                                    <ClientSettings>   
 
                                                                        <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"   
 
                                                                            AllowScroll="True" />   
 
                                                                    </ClientSettings>   
 
                                                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" Font-Bold="true" Font-Size="10px"   
 
                                                                        Font-Names="Verdana"></HeaderStyle>   
 
                                                                    <MasterTableView Width="930px" AutoGenerateColumns="false" EnableColumnsViewState="false"   
 
                                                                        CellSpacing="-1">   
 
                                                                        <Columns>   
 
                                                                        </Columns>   
 
                                                                    </MasterTableView>   
 
                                                                </telerik:RadGrid></telerik:RadPane>   
 
                                                        </telerik:RadSplitter>   
 
                                                    </telerik:RadPageView>   
 
                                                    <telerik:RadPageView ID="Providers" runat="server">   
 
                                                        <telerik:RadSplitter ID="rsMrketStat_Providers" runat="server" Skin="Telerik" Font-Names="Verdana"   
 
                                                            BorderSize="0" Width="930px" Height="390px">   
 
                                                            <telerik:RadPane Height="390px" Scrolling="None" ID="Radpane5" runat="server">   
 
                                                                <div runat="server" id="divGridNoDataMsg_Providers" visible="false" style="background-color: White;   
 
                                                                    text-align: center; padding: 10px; line-height: 18px"> 
 
                                                                    <asp:Label ID="Label3" Font-Names="Verdana" runat="server" Font-Size="10pt" Text="XXXXXX"></asp:Label><br />   
 
                                                                </div>   
 
                                                                <telerik:RadGrid ShowFooter="false" Width="930px" Height="390px" ID="rgMrktStat_Providers"   
 
                                                                    runat="server" Skin="Outlook" AutoGenerateColumns="false">   
 
                                                                    <ClientSettings>   
 
                                                                        <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"   
 
                                                                            AllowScroll="True" />   
 
                                                                    </ClientSettings>   
 
                                                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" Font-Bold="true" Font-Size="10px"   
 
                                                                        Font-Names="Verdana"></HeaderStyle>   
 
                                                                    <MasterTableView Width="930px" AutoGenerateColumns="false" EnableColumnsViewState="false"   
 
                                                                        CellSpacing="-1">   
 
                                                                        <GroupByExpressions>   
 
                                                                            <telerik:GridGroupByExpression>   
 
                                                                                <GroupByFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="Category2Name" />   
 
                                                                                </GroupByFields>   
 
                                                                                <SelectFields>   
 
                                                                                    <telerik:GridGroupByField FieldName="Category2Name" HeaderText=" " HeaderValueSeparator="" />   
 
                                                                                </SelectFields>   
 
                                                                            </telerik:GridGroupByExpression>   
 
                                                                        </GroupByExpressions>   
 
                                                                        <Columns>   
 
                                                                        </Columns>   
 
                                                                    </MasterTableView>   
 
                                                                </telerik:RadGrid>   
 
                                                            </telerik:RadPane>   
 
                                                        </telerik:RadSplitter>   
 
                                                    </telerik:RadPageView>   
 
                                                    <telerik:RadPageView runat="server" ID="MarketBrandPerformance">   
 
                                                        <telerik:RadSplitter ID="rsBP" runat="server" Skin="Telerik" Font-Names="Verdana"   
 
                                                            BorderSize="0" Width="930px" Height="390">   
 
                                                            <telerik:RadPane Height="390px" Scrolling="None" ID="Radpane4" runat="server">   
 
                                                                <div runat="server" id="divGridNoDataMsg_BP" visible="false" style="background-color: White;   
 
                                                                    text-align: center; padding: 10px; line-height: 18px"> 
 
                                                                    <asp:Label ID="Label4" Font-Names="Verdana" runat="server" Font-Size="10pt" Text="XXXXXX"></asp:Label><br />   
 
                                                                </div>   
 
                                                                <telerik:RadGrid ShowFooter="false" Width="930px" Height="390px" ID="rgMrktStat_BP"   
 
                                                                    runat="server" Skin="Outlook" AutoGenerateColumns="false">   
 
                                                                    <ClientSettings>   
 
                                                                        <Scrolling FrozenColumnsCount="2" SaveScrollPosition="true" UseStaticHeaders="true"   
 
                                                                            AllowScroll="True" />   
 
                                                                    </ClientSettings>   
 
                                                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" Font-Bold="true" Font-Size="10px"   
 
                                                                        Font-Names="Verdana"></HeaderStyle>   
 
                                                                    <MasterTableView Width="930px" AutoGenerateColumns="false" EnableColumnsViewState="false"   
 
                                                                        CellSpacing="-1">   
 
                                                                        <Columns>   
 
                                                                        </Columns>   
 
                                                                    </MasterTableView>   
 
                                                                </telerik:RadGrid></telerik:RadPane>   
 
                                                        </telerik:RadSplitter>   
 
                                                    </telerik:RadPageView>   
 
                                                </telerik:RadMultiPage>   
 
                                            </td>   
 
                                        </tr> 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



waiting for the reply...

0
Pavlina
Telerik team
answered on 15 Mar 2010, 12:48 PM
Hello Binod,

I reviewed the code, and it looks correct. If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior.
We will debug it locally, and get back to you with additional information on the matter.

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Binod
Top achievements
Rank 1
Answers by
Sudhanva
Top achievements
Rank 1
Pavlina
Telerik team
Binod
Top achievements
Rank 1
Share this question
or