+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / RadAjaxManager with Loading Panel

RadAjaxManager with Loading Panel

8 posts, 0 answered
  1. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    18 May 2011
    Link to this post
    I am currently using Sitefinity v. 3.7 SP4 and have developed a User Control with a RadComboBox and a RadGrid to perform filtering of the records in the RadGrid control. 

    I have implemented AutoPostBack for the RadComboBox as well as the CheckedChanged event for the checkbox in the RadGrid.   I am using custom/advanced binding with a List collection and filtering records/data out of the collection using LINQ/Lambda expressions.  If I use the code without the RadAjaxManager, everything works fine except for the annoying complete page refreshes.
    In order to remove the page refreshes, I have implemented the RadAjaxManager.  The RadAJAXManager functionality seems to work just fine outside of the context of Sitefinity v. 3.7 SP4, however, when I place the User Control inside of Sitefinity v. 3.7 SP4, during the filtering postback, I get thrown out of the page completely and redirected to another screen altogether. 

    I have not been able to figure out what I have been doing incorrectly that would cause it to work fine outside of Sitefinity but fail miserably within the context of SItefinity.  Interestingly enough, I have tried this in several browsers and I experience the redirection problem primarily in IE 8 and IE 9 using Sitefinity.  I am not able to reproduce the problematic behavior in either Firefox or Chrome.


    Below is my relevant code:

    <asp:wizardstep id="wizStepClassReg" title="Class Registration" runat="server" steptype="Step">
               <asp:validationsummary id="vldSummaryCourseSelection" validationgroup="selectedCourses"
                   displaymode="SingleParagraph" showmessagebox="true" runat="server" forecolor="Red" />
               <asp:customvalidator id="vldCustomCourseSelection" runat="server" onservervalidate="vldCustomCourseSelection_ServerValidate"
                   validationgroup="selectedCourses" errormessage="Please select at least one course for registration"
                   display="None" />
               <telerik:radajaxmanager id="RadAjaxManager1" runat="server" enableajax="true" defaultloadingpanelid="RadAjaxLoadingPanel1">
                   <ajaxsettings>
                       <telerik:ajaxsetting ajaxcontrolid="ddlSubject">
                           <updatedcontrols>
                               <telerik:ajaxupdatedcontrol controlid="gv" loadingpanelid="RadAjaxLoadingPanel1" />
                           </updatedcontrols>
                       </telerik:ajaxsetting>
                       <telerik:ajaxsetting ajaxcontrolid="gv">
                           <updatedcontrols>
                               <telerik:ajaxupdatedcontrol controlid="gv" loadingpanelid="RajAjaxLoadingPanel1" />
                           </updatedcontrols>
                       </telerik:ajaxsetting>
                   </ajaxsettings>
               </telerik:radajaxmanager>
               <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" skin="Outlook" />
               <table>
                   <tr>
                       <td>
                           <asp:label id="lblFilterSubject" runat="server" associatedcontrolid="ddlSubject"
                               text="Filter by Subject:" />
                           <telerik:radcombobox id="ddlSubject" runat="server" markfirstmatch="true" allowcustomtext="true"
                               onselectedindexchanged="ddlSubject_SelectedIndexChanged" autopostback="true" />
                       </td>
                   </tr>
               </table>
               <telerik:radgrid id="gv" autogeneratecolumns="false" showfooter="false" runat="server"
                   cellspacing="0" gridlines="None" allowpaging="true" allowsorting="true" skin="Outlook"
                   onpageindexchanged="RadGrid1_PageIndexChanged" showgrouppanel="false" onsortcommand="RadGrid1_SortCommand"
                   onpagesizechanged="RadGrid1_PageSizeChanged" onitemdatabound="gv_ItemDataBound">
                   <mastertableview datakeynames="CourseID" pagesize="25">
                       <commanditemsettings exporttopdftext="Export to Pdf"></commanditemsettings>
                       <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column">
                       </rowindicatorcolumn>
                       <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column">
                       </expandcollapsecolumn>
                       <groupbyexpressions>
                           <telerik:gridgroupbyexpression>
                               <selectfields>
                                   <telerik:gridgroupbyfield fieldalias="AgeGroup" fieldname="CategoryDesc" />
                                   <telerik:gridgroupbyfield fieldalias="Subject" fieldname="SubjectDesc" />
                               </selectfields>
                               <groupbyfields>
                                   <telerik:gridgroupbyfield fieldname="CategoryDesc" sortorder="None" />
                                   <telerik:gridgroupbyfield fieldname="SubjectDesc" sortorder="None" />
                               </groupbyfields>
                           </telerik:gridgroupbyexpression>
                       </groupbyexpressions>
                       <columns>
                           <telerik:gridboundcolumn uniquename="CourseID" readonly="true" display="false" datafield="CourseID" />
                           <telerik:gridtemplatecolumn>
                               <itemtemplate>
                                   <asp:checkbox runat="server" id="chk" oncheckedchanged="CheckChanged" autopostback="true" />
                               </itemtemplate>
                           </telerik:gridtemplatecolumn>
                           <telerik:gridboundcolumn headertext="Age Group" datafield="CategoryDesc" />
                           <telerik:gridboundcolumn headertext="Subject" datafield="SubjectDesc" />
                           <telerik:gridboundcolumn uniquename="CourseDescription" datafield="CourseDescription"
                               headertext="Ages" />
                           <telerik:gridboundcolumn headertext="Term" datafield="term.TermDesc" />
                           <telerik:gridboundcolumn headertext="Course Cost" datafield="Cost" dataformatstring="{0:C}" />
                           <telerik:gridboundcolumn headertext="Length (Weeks)" datafield="CourseLength" />
                           <telerik:gridboundcolumn headertext="Days" datafield="Days" />
                           <telerik:gridboundcolumn headertext="Start Time" datafield="StartTime" />
                           <telerik:gridboundcolumn headertext="End Time" datafield="EndTime" />
                           <telerik:gridboundcolumn headertext="Location" datafield="location.LocationDesc" />
                       </columns>
                       <editformsettings>
                           <editcolumn filtercontrolalttext="Filter EditCommandColumn column">
                           </editcolumn>
                       </editformsettings>
                   </mastertableview>
                   <headercontextmenu cssclass="GridContextMenu GridContextMenu_Default">
                   </headercontextmenu>
               </telerik:radgrid>
           </asp:wizardstep>

    To observe a video of this behavior, you can view it here: http://screencast.com/t/IBdxgrQR7d and here: http://screencast.com/t/HIE0gMEwi

    Please advise.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    23 May 2011
    Link to this post
    Hello Samir Vaidya,

    When you are using RadAjaxManager with Sitefinity you have to apply the approach described in this scenario: Ajax / User Controls/Master pages. I have created a small sample control and added the master page used. I have not implemented the filtering logic, but you can see that when the combobox posts back there is only a partial page update.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    24 May 2011
    Link to this post
    If I am not currently using the RadAjaxManager in the Master Page and only within my User Control, does that mean I still have to add the RadAjaxManager to my Master Page so that I can add the RadAjaxManagerProxy control?  
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 May 2011
    Link to this post
    Hello Samir Vaidya,

    Yes. This is a requirement for the RadAjaxManager control when it runs in such scenarios.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    27 May 2011
    Link to this post
    I applied the changes as suggested including the enableAjax="false" property in the Master Page.

    However, now I have pretty much lost all of the benefits of using Ajax since the Page continues to perform a full page refresh when I filter using the DropDownList.

    If I change the enableAjax="true" property in the Master Page, the functionality works fine in Google Chrome, Opera and Firefox including the display of the Loading Panel image/icon, however, this does not work at all in IE 8 or IE 9.  Instead, the entire filtering process using the DropDownList is broken when I change the enableAjax="true" property in the Master Page. 

    Please advise.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    02 Jun 2011
    Link to this post
    Hello Samir

    Try adding the manager to the master page as shown below

    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"></telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" BackgroundPosition="Center" Skin="Vista">
    </telerik:RadAjaxLoadingPanel>

    Then inside Page_Load of the control add AddAjaxSetting

    protected void Page_Load(object sender, EventArgs e)
       {
           
           RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);
           ajaxManager.AjaxSettings.AddAjaxSetting(this.Panel1, this.Panel1);
     
     
            
           RadGrid1.DataSource = myds;
           RadGrid1.DataBind();
     
     
       }

    and wrap the RadGrid inside Panel control

    <asp:Panel runat="server" ID="Panel1">
    <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false" Skin="Vista">
     
     .....
     
    </Panel>


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    09 Jun 2011
    Link to this post
    The specified code completely breaks on IE 8 and IE 9, causing the filtering capability to not work at all.  However, it works just fine in Google Chrome and practically any other browser.

    Please provide me with a suitable solution that works in IE 8 and IE 9.

    Thanks.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    13 Jun 2011
    Link to this post
    Hi Samir,

    The code above works fine in IE 9. I have not tested under IE9 , since Sitefinity 3.x does not officially support it, because it uses old version of Telerik.Web.UI dll which is not compatible with IE 9.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
8 posts, 0 answered