OnEntryAdded not fired if OnClientEntryAdded specified

4 posts, 0 answers
  1. Tauqir
    Tauqir avatar
    10 posts
    Member since:
    Jul 2013

    Posted 14 Aug 2013 Link to this post

    I have a RadDropDownTree on my page as follows:

    <telerik:RadDropDownTree ID="Tree1" runat="server" ButtonSettings-ShowClear="true" OnClientEntryAdded="EntryAdded" AutoPostBack="true" DefaultMessage="--Select--" DefaultValue="-1" OnEntryAdded="Tree1_EntryAdded">
        <DropDownSettings AutoWidth="Enabled" CssClass="raddropdowntree" />

    The EntryAdded client side event is used to collapse the dropdown upon selection and is as follows:

    function EntryAdded(sender, eventArgs) {
        return true;

    The EntryAdded server side event is currently blank.

    My problem is that the server side event EntryAdded is not fired if I specify the OnClientEntryAdded client side event. Postback happens upon selection of any item in the dropdowntree, Page_Load is fired, but then the control returns to the page without invoking the EntryAdded event. Another issue is that after postback, my selected value is cleared and it goes back to the default value of "--Select--".

    I also tried replacing the declaration with  OnClientEntryAdded="if(!EntryAdded()) { return false; }"  but this returns a JavaScript error, saying if is unexpected.

    If I remove the client side event, the EntryAdded server side event is invoked and the selected value of the dropdowntree is also retained. 

    The entire thing is in a RadAjaxPanel, if it helps.

    Please advise. Thanks in advance.

  2. Tauqir
    Tauqir avatar
    10 posts
    Member since:
    Jul 2013

    Posted 15 Aug 2013 Link to this post

    The following is a workaround that I found on the Telerik help forums.

    function EntryAdded(sender, args) {
        setTimeout(function () { sender.closeDropDown(); }, 200);

  3. Tarang
    Tarang avatar
    11 posts
    Member since:
    Jun 2013

    Posted 16 Aug 2013 Link to this post

    No that does not seems to be working for me.. I've same situation.
  4. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 21 Aug 2013 Link to this post

    Hi Tarang,

    Please try to increase the awaiting time to 500 and test again.

    Peter Filipov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top