Entries Collection Error when used with RadAjaxManagerProxy

7 posts, 1 answers
  1. Jerry
    Jerry avatar
    9 posts
    Member since:
    Oct 2011

    Posted 31 Mar 2014 Link to this post

    In my case there seems to be a problem with the RadDropDownTree in which the DropDownTreeEntries collection is not properly managed by RadDropDownTree.  When RadAjaxManagerProxy is configured as shown in the following code example the Entries collection is always appended to, It never shrinks. If I comment out the line containing AjaxUpdatedControl then the RadDropDownTree begins working correctly again. I also tested this in a straight up ASP page with RadAjaxManager and found that RadDropDownTree works as expected. It seems that this problem only exists if using a RadAjaxManagerProxy on a Content page. Has anyone else seen this behavior and is there a workaround.    
      
     <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">       
            <AjaxSettings>           
                <telerik:AjaxSetting AjaxControlID="RadButton2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="MasterUpdatePanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Apr 2014 in reply to Jerry Link to this post

    Hi Jerry,

    Please have a look into the sample code snippet which works fine at my end.

    Master Page :
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>

    Content Page:
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadButton1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadDropDownTree ID="RadDropDownTree1" runat="server" DataFieldID="EmployeeID"
        DataFieldParentID="ReportsTo" DataTextField="EmployeeID" DataSourceID="SqlDataSource2">
    </telerik:RadDropDownTree>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Submit">
    </telerik:RadButton>
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
    </telerik:RadGrid>

    Please provide your code if it doesn't help.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jerry
    Jerry avatar
    9 posts
    Member since:
    Oct 2011

    Posted 01 Apr 2014 in reply to Shinu Link to this post

    The problem is in the RadDropDownTree Entries collection. Put a breakpoint in your submit button handler. Run the project in debug, select a node or two from the DropDownTree, click your submit button,  and when it hits your breakpoint, take a look at RadDropDownTree1 Entries collection in the watch window. Click continue to allow the project to continue running. Now change your DropDownTree selection and re-submit. When it hits the breakpoint, take a look at the Entries collection. You should see that the your current selections have been appended to your previous selection. If you comment out RadAjaxManagerProxy1 and re-run these steps you will see a completely different behavior in how RadDropDownTree manages the Entries collection.     
  5. Answer
    Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 03 Apr 2014 Link to this post

    Hello,

    I have finally replicated the issue described. In such cases when server side changes have to be retrieved and used from RadDropDownTree we kindly recommend using AutoPostBack="true" of the control. 

    Regards,
    Plamen
    Telerik
     

    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.

     
  6. Jerry
    Jerry avatar
    9 posts
    Member since:
    Oct 2011

    Posted 04 Apr 2014 in reply to Plamen Link to this post

    I implemented your suggestion and also moved my RadDropDownTree into a RadToolbar.  It seems to work correctly now. Thank You.
  7. Jerry
    Jerry avatar
    9 posts
    Member since:
    Oct 2011

    Posted 29 May 2014 in reply to Plamen Link to this post

    I really don't want my application to do a full page postback. Is AutoPostBack="true" the only solution?  Can't this be Ajax Enabled?  
  8. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 30 May 2014 Link to this post

    Hi Jerry,

    You can try to add the RadDropDownTree  to the Ajax settings so it is Ajax Enabled and do not perform PostBack.

    Hope this will be helpful.

    Regards,
    Plamen
    Telerik
     

    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
UI for ASP.NET Ajax is Ready for VS 2017