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

[Solved] RadGrid Columns Not Freezing On Initial PageLoad But Start After Ajax Postback

5 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Josh Horton
Top achievements
Rank 1
Josh Horton asked on 29 Oct 2009, 08:03 PM
The title pretty much says it all. I have a grid with columns that start freezing only after a command event has triggered a postback to the AjaxManager. Here is a sample of my markup...

<rad1:RadGrid ID="grdImpRecords" runat="server"  AutoGenerateColumns="false" Skin="WebBlue"
    AllowPaging="true" PageSize="50"
    OnUpdateCommand="grdImpRecords_UpdateCommand"
    OnNeedDataSource="grdImpRecords_NeedDataSource" >
   
    <PagerStyle Mode="NextPrevNumericAndAdvanced"/>

    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="2"  />
    </ClientSettings>

    <MasterTableView DataKeyNames="AssignmentID" EditMode="InPlace" TableLayout="Fixed" >

        <EditItemStyle Width="165px" />
        <ItemStyle Width="165px" />
        <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                                   
        <Columns >

            <rad1:GridTemplateColumn HeaderButtonType="None" HeaderText="Discard" UniqueName="DiscardColumn">
                <HeaderStyle Width="105px" />
                <ItemStyle Width="105px" HorizontalAlign="Center" />
                <HeaderTemplate>
                    <input type="checkbox" class="DiscardCheckbox" id="HeaderCheckbox" onclick="" />
                    <label for="HeaderCheckbox" id="HeaderCheckBoxLabel" >Check All</label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox runat="server" CssClass="DiscardCheckBox" ID="chkDiscard" />
                </ItemTemplate>
            </rad1:GridTemplateColumn>
           
            <rad1:GridEditCommandColumn UniqueName="EditColumn" >
                <HeaderStyle Width="100px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="100px" HorizontalAlign="Center" />
            </rad1:GridEditCommandColumn>
           
            <rad1:GridBoundColumn UniqueName="LoanNumber">
                <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="165px" />
            </rad1:GridBoundColumn>
           
            <rad1:GridBoundColumn UniqueName="InvestorLoanNumber"  >
                <HeaderStyle Width="165px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Bold="true" />
                <ItemStyle Width="165px" />
            </rad1:GridBoundColumn>
           
        </Columns>
                                    
    </MasterTableView>
</rad1:RadGrid>


Thanks for any help.

5 Answers, 1 is accepted

Sort by
0
Josh Horton
Top achievements
Rank 1
answered on 29 Oct 2009, 08:35 PM
Anyone???
0
Veli
Telerik team
answered on 04 Nov 2009, 12:56 PM
Hi Josh,

Could not reproduce any issues with frozen columns from the markup you provided. Can you give more specific details and some way to reproduce what you are getting?

Greetings,
Veli
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.
0
Josh Horton
Top achievements
Rank 1
answered on 05 Nov 2009, 03:08 PM
So when you used my code you were able to see the columns freezing on initial page load? I'm not sure what else I can add. I can list the other controls being used on the page in hierarchy fashion:

<asp:Content >
<div>
<asp:ScriptManager> .... </asp:ScriptManager>
<asptoolkit:TabContainer>
  <asptoolkit:TabPanel><ContentTemplate>
    
     <rad1:RadAjaxManager>
       <rad1:AjaxSetting AjaxControlID="grdImpRecords">
         <UpdatedControls>
           <rad1:AjaxUpdatedControl ControlID="pnlGridImpRecords" LoadingPanelID="RadAjaxLoadingPanel1" />
         </UpdatedControls>
       </rad1:AjaxSetting>
     </rad1:RadAjaxManager>
    
     <asp:Panel ID="pnlGridImpRecords">

       <rad1:RadAjaxPanel>
         <rad1:RadScriptBlock>
           <script> ..... </script>
         </rad1:RadScriptBlock>
       </rad1:RadAjaxPanel>

       <rad1:RadGrid ID="grdImpRecords" >
         .... Grid From Above Posting ....
       </rad1:RadGrid ID="grdImpRecords">

     </asp:Panel ID="pnlGridImpRecords">

  </ContentTemplate></asptoolkit:TabPanel>
</asptoolkit:TabContainer>
</div>
</asp:Content>

I do appreciate your help in this matter. I'm not really sure why it won't freeze on page load. Totally blows my mind.

Thanks again.
0
Veli
Telerik team
answered on 06 Nov 2009, 08:13 AM
Hello Josh,

Have you tried disabling AJAX to see if it works? I can see that you are using master/content page scenario and your RadAjaxManager appears to be in the content page, while it needs to go to the master page. In the content page, you can define a RadAjaxManagerProxy:

AJAX Manager Proxy

Additionally, if you are using AJAX manager, you should not use RadAjaxPanel:

Current AJAX limitations

These things get me believing that the issue lies with AJAX. Try removing all AJAX from your page and let me know what you get.

All the best,
Veli
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.
0
Josh Horton
Top achievements
Rank 1
answered on 09 Nov 2009, 07:17 PM
Sorry for the delay in replying, I was put on another task and finally can get back to this one. I removed all ajax from the page, and even removed the jQuery script thinking that the document ready function might be having something to do with it. But no luck. I did remove the AjaxRadPanel permanently because I found out about the jQuery .live() method that fixed the reason for using the AjaxPanel. Still not sure why the columns do not freeze until there is a postback. But for now I'm just going to put the edititems in a form and just have it become visible with a rowDblClick. I thank you for your help in this matter and still would like to find out why this is, since I'm the type to not be able to let something go without knowing why. But I'll post if I ever find out a fix for this.
Tags
Grid
Asked by
Josh Horton
Top achievements
Rank 1
Answers by
Josh Horton
Top achievements
Rank 1
Veli
Telerik team
Share this question
or