AJAX: RadGrid and User Control in RadSplitter

5 posts, 0 answers
  1. steve
    steve avatar
    8 posts
    Member since:
    Jul 2012

    Posted 13 Nov 2010 Link to this post

    Hi there,

    I have a page with RadSplitter which contains RadGrid and my custom user control (Footer) in two separate
    RadPanes. I enabled ajax on the grid, but I would like to update the footer with ajax as well. In code
    below I have tried inserting the footer id or the id of a panel that wraps the footer as ControlID in
    AjaxUpdateControl tag. None of them worked and they even caused that the RadGrid doesn't work properly
    (when I click on the next page button, it doesn't change the page, but loading icon is shown).
    The footer user control contains only <%Reponse.Write(DateTime.Now);%>.

    What am I missing?


    <
    telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid" UpdatePanelHeight="100%" />
                                <telerik:AjaxUpdatedControl ControlID="***WhatShouldBeHere?***" UpdatePanelHeight="100%" />
                        
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadSplitter ID="RadSplitter" runat="server" Orientation="Horizontal">
            <telerik:RadPane ID="TitleRadPane" runat="server" Height="26px" >
              <!-- ...... -->
            </telerik:RadPane>
            <telerik:RadPane ID="ContentRadPane" runat="server" Scrolling="None">
                <telerik:RadGrid
                    ID="RadGrid"     
                    DataSourceID="MasterObjectDataSource"
                    EnableLinqExpressions="false"
                    OnUpdateCommand="UpdateGrid"
                    OnInsertCommand="UpdateGrid"
                    OnDeleteCommand="DeleteItem"
                    runat="server">
     
                    <ClientSettings>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                        <Selecting AllowRowSelect="true" />
                    </ClientSettings>
     
                    <MasterTableView CommandItemDisplay="Top" AllowSorting="true" DataSourceID="MasterObjectDataSource" AllowFilteringByColumn="True" IsFilterItemExpanded="False" DataKeyNames="Id">
     
                        <CommandItemTemplate>
                           <!-- .... -->
                        </CommandItemTemplate>
     
                        <EditFormSettings UserControlName="AreaDetail.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="DummyEditColumnUniqueName">
                            </EditColumn>
                        </EditFormSettings>
     
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
     
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
     
                        <Columns>
                           <!-- .... -->
                        </Columns>
                    </MasterTableView>
                    <SelectedItemStyle Wrap="True" />
                    <SortingSettings SortedBackColor="" EnableSkinSortStyles="false" />
                </telerik:RadGrid>
            </telerik:RadPane>
     
            <telerik:RadPane ID="FooterRadPane" runat="server" Height="100">
                <asp:Panel ID="FooterPanel" runat="server">
                    <metTrade:Footer ID="Footer" runat="server">
                    </metTrade:Footer>
                </asp:Panel>
            </telerik:RadPane>
        </telerik:RadSplitter>
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Nov 2010 Link to this post

    Hello,

    Please try to add the whole FooterRadPane into the RadAjaxSettings and let me know what the result is. If this doesn't help please prepare a simple, fully runnable reproduction demo, open a new support ticket and send it to us along with very detailed reproduction steps and explanations and we will debug it locally and we will do our best to help.


    Sincerely yours,
    Maria Ilieva
    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
  3. steve
    steve avatar
    8 posts
    Member since:
    Jul 2012

    Posted 16 Nov 2010 Link to this post

    Thank you for your reply. FooterRadPane doesn't work as well. Here is a smaller example which should compile as is and reproduce the possible bug.

    <%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="TestList.aspx.cs" Inherits="Administration_TestList" %>
    <html>
        <head runat="server">
            <title>Test</title>
        </head>
        <body>
        <form id="mainForm" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager" runat="server" />
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid" />               
                            <telerik:AjaxUpdatedControl ControlID="FooterPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
     
            <telerik:RadSplitter Orientation="Horizontal" Height="100%" ID="RadSplitter" runat="server">
                <telerik:RadPane runat="server">
                    Header
                </telerik:RadPane>
     
                <telerik:RadPane runat="server">
                    <telerik:RadGrid
                        ID="RadGrid"
                        AutoGenerateColumns="true"
                        AllowPaging="true"
                        AllowSorting="true"
                        runat="server">
                    </telerik:RadGrid>           
                </telerik:RadPane>
     
                <telerik:RadPane ID="FooterPane" runat="server">
                    <asp:Panel ID="FooterPanel" runat="server">
                        <% Response.Write(DateTime.Now); %>
                    </asp:Panel>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </form>
        </body>
    </html>

    and simple code behind:
    using System;
     
    public partial class Administration_TestList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.RadGrid.DataSource = new[]
            {
                new {Name = "Test", Surname = "Test1"},
                new {Name = "Test", Surname = "Test2"},
                new {Name = "Test", Surname = "Test3"},
                new {Name = "Test", Surname = "Test4"},
                new {Name = "Test", Surname = "Test5"},
                new {Name = "Test", Surname = "Test6"},
                new {Name = "Test", Surname = "Test7"},
                new {Name = "Test", Surname = "Test8"},
                new {Name = "Test", Surname = "Test9"},
                new {Name = "Test", Surname = "Test10"},
                new {Name = "Test", Surname = "Tes11"},
                new {Name = "Test", Surname = "Test12"},
                new {Name = "Test", Surname = "Test13"},
                new {Name = "Test", Surname = "Test14"},
                new {Name = "Test", Surname = "Test15"}
            };
        }
    }
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Nov 2010 Link to this post

    Hello Steve,

    Thank you for the provided code.

    I was able to replicate the issue using it. However note that the Response.Write is not supported it ASP.NET Ajax. So in this scenario I would suggest you to use a regular Label control into the FooterPane for showing the needed information.
    I hope this helps.


    All the best,
    Maria Ilieva
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  5. steve
    steve avatar
    8 posts
    Member since:
    Jul 2012

    Posted 23 Nov 2010 Link to this post

    Maria Ilieva,

    thank you for your assistance. I should have read the documentation more carefully. 

    Just for others who might experience similar thing: it seems that if there is a Response.Write call anywhere in a control then nothing (even labels, grids) is not refreshed.
Back to Top