Updating/ refreshing the controls which are in Rad ajax panel

2 posts, 0 answers
  1. ajay
    ajay avatar
    2 posts
    Member since:
    Feb 2015

    Posted 03 Feb 2015 Link to this post

     Hi, I am facing problem in updating/ refreshing the controls which are in Rad ajax panel .I have a Rad ajax panel in which i have placed a grid, and RadPanelBar side to side by placing them in table.when the user selects any record in grid the details of that record will be shown in it's beside RadPanelBar. So in this process of selecting records i am refreshing the Entire Rad ajax panel for getting the correct selected record details.But additionally what i want is when the user sorts the records of grid i need to refresh the grid only , for this i placed Radgrid again in other radajaxpanel which is creating the problems.

          My Radgrid is not getting updated with the click events of grid, when i click on link button of grid it should highlight the clicked row. But when i placed grid in Ajax panel it is not getting highlighted untill unleass i refresh the Grid. when i placed it in another nested rad ajax panel. Please help me how can i achieve refreshing the only the Radgrid while sorting?My design:
    <telerik:RadPageView ID="radPage1" runat="server">
           <telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" EnableAJAX="True" LoadingPanelID="RadAjaxLoadingPanel1"
                            <table width="100%" cellpadding="0" cellspacing="0">
                                    <td style="width: 50%">
                                  <%-- <telerik:RadAjaxPanel ID="RadAjaxPanel4" runat="server" EnableAJAX="True" LoadingPanelID="RadAjaxLoadingPanel1"
                                   ClientEvents-OnRequestStart="onRequestStart"> --%>
                                       <telerik:RadGrid ID="radGrid" runat="server" AllowSorting="true" AllowFilteringByColumn="False"
                                            OnNeedDataSource="grdUnResolvedFaxes_NeedDataSource" Skin="Metro" CellSpacing="0"
                                            GridLines="None" Width="99%" PageSize="12" OnItemCommand="grdUnResolvedFaxes_ItemCommand"
                                 <%-- </telerik:RadAjaxPanel> --%>
                                  <td style="width: 50%">
                                     <telerik:RadPanelBar runat="server" ID="pnlBar" ExpandMode="MultipleExpandedItems"
                                            Width="99%" Visible="false">

      For the Linkbutton click of the grid i added below code to update the grid   

          if (e.CommandName.ToLower() == "select")
               RadAjaxPanel4.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel3.ClientID));

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 05 Feb 2015 Link to this post

    Hello Ajay,

    In order to achieve the required functionality you should use RadAjaxMnager instead of nested RadAjaxPanel's and use the RadAjaxManager's EventName property like this:

    <telerik:RadAjaxManager runat="server">
                    <telerik:AjaxSetting AjaxControlID="radGrid" EventName="SortCommand">
                            <telerik:AjaxUpdatedControl ControlID="radGrid" />
                    <telerik:AjaxSetting AjaxControlID="radGrid" EventName="SelectedIndexChanged">
                            <telerik:AjaxUpdatedControl ControlID="pnlBar" />

    Give this a try and see if it works for you.

    Maria Ilieva

    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.

Back to Top