OnClientSplitButtonClicking - cancel selection

4 posts, 0 answers
  1. Karl Maynard
    Karl Maynard avatar
    19 posts
    Member since:
    Apr 2005

    Posted 21 Apr 2013 Link to this post

    I have implemented an OnClientSplitButtonClicking event handler on the client side, usign this i can call set_cancel(true) which prevents the button click event being fired.

    However, it is still selecting the button as the selected button in the ribbonbar - i.e. it still updates the selected index of the split button itself.

    Any ideas on how can i prevent this ?

    I have tried adding client side handlers for OnClientButtonClicking, OnClientButtonToggling and OnClientSplitButtonClicking - but nothing else seems to allow me to cancel this.

    Currently, i am having to reset the selection manually:

    function OnSplitButtonClicking(sender, args) {
         args.set_cancel(true);
     
         var splitButton = findSplitButton("spbActions");
     
         if (splitButton != null)
           setTimeout(function () { splitButton.set_selectedButtonIndex(0); }, 0);
     
    }
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 24 Apr 2013 Link to this post

    Hi Karl,

    I tested the issue that you describe and indeed it is a bug of the RadRibbonBar control when canceling the server side event. We have already fixed it and the fix will be available with the internal build next week. You can also find your Telerik point updated.

    Kind regards,
    Kate
    the Telerik team
    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 their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matthew Botting
    Matthew Botting avatar
    41 posts
    Member since:
    Apr 2005

    Posted 18 Oct 2013 Link to this post

    Hi Kate,
    I do agree that this was a bug, however we were using the set_cancel on this event to stop a postback from triggering in the previous release.
    Since upgrading we have had to use code very similar to what Karl posted in order to reset the value after cancelling the event.

    Is there a way of cancelling the postback but not the event?

    Thanks,
    Matt
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 22 Oct 2013 Link to this post

    Hello Matt,

    Unfortunately we are not aware of such workaround that will enable you to cancel the post back and at the same time be able to execute the following events when using the set_cancel(true). However, we will appreciate it very much if you come up with a possible solution and share it with us.  

    Regards,
    Kate
    Telerik
    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