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

Frozen columns in a Popup Panel

2 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
daxriders
Top achievements
Rank 1
daxriders asked on 24 Nov 2009, 10:11 AM
Hi,

I'm trying to display a Grid in a Popup Panel. The problem is when the popup is first diplayed the columns are not frozen. Only after I click on a column's header for sorting, will the "column freezing" work.
Any idea why is that so? Or how to fix this and make the "column freezing" work on display?

Thanx.

Dax

        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
         
    <asp:Button runat="server" ID="cmdPopupTarget" Style="display: none" />     
    <cc1:ModalPopupExtender ID="popupExt" runat="server" TargetControlID ="cmdPopupTarget"  
    PopupControlID ="panPopup" DropShadow="True" BackgroundCssClass ="ISPopupBackground"  
    OkControlID="panPopup$cmdPopupOk" BehaviorID="programmaticModalPopupBehavior" RepositionMode="RepositionOnWindowScroll"</cc1:ModalPopupExtender>    
 
        <asp:Panel runat="server" ID="panPopup" Style="display: none; padding: 10px" CssClass ="ISPopup">                 
        <div> 
        <asp:Panel runat="server" ID="popContent" > 
        <div> 
            <asp:UpdatePanel ID="upaPopup" runat="server" UpdateMode="Conditional" > 
            <ContentTemplate>   
 
                <telerik:RadGrid ID="RadGrid1" AllowSorting="true" GridLines="Both" width="500px" runat="server"
                    <ClientSettings>  
                        <Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true" />  
                    </ClientSettings>  
                    <HeaderStyle Width="200px"/> 
                </telerik:RadGrid> 
 
            </ContentTemplate>  
            </asp:UpdatePanel>  
        </div> 
        <asp:Button ID="cmdPopupOk" runat="server" Text="Ok"/> 
        </asp:Panel> 
        </div> 
        </asp:Panel> 
 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
 
    End Sub 
 
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button1.Click 
        Dim DS As DataSet 
        Dim CN As SqlConnection 
        Dim DA As SqlDataAdapter 
 
        DS = New DataSet() 
        CN = New SqlConnection("Server=xxx;Database=xxx;User ID=xxx;Password=xxx;Trusted_Connection=False;"
        DA = New SqlDataAdapter("Select top 10 * From time_hist", CN) 
        DA.Fill(DS, "time_hist"
 
        RadGrid1.DataSource = DS.Tables("time_hist"
        RadGrid1.DataBind() 
 
        upaPopup.Update() 
        popupExt.Show() 
 
    End Sub 

2 Answers, 1 is accepted

Sort by
0
daxriders
Top achievements
Rank 1
answered on 24 Nov 2009, 02:18 PM
anyone??
0
Pavlina
Telerik team
answered on 26 Nov 2009, 11:48 AM
Hi Daxriders,

When you are using frozen columns with scrolling enabled and UseStaticHeaders is True, you should set fixed widths for your grid columns (through their HeaderStyle -> Width property) or TableLayout = Fixed for the MasterTableView. Note that the default table layout for the grid with scrolling enabled is auto and this may cause the unwanted effect when you enable the frozen columns functionality.

Additionally, please review the following article which elaborate on this subject:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/frozencolumns/defaultcs.aspx

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
daxriders
Top achievements
Rank 1
Answers by
daxriders
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or