cancel ontabclick

5 posts, 1 answers
  1. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 28 Jun 2011 Link to this post

    I have a RadTabStrip with an ontabclick event.  How can I cancel the event after a tab is clicked so that the user stays on the current tab?

    I am using version 2010.3.1215.40

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 29 Jun 2011 Link to this post

    Hello Craig,

    I don't know if you're doing something on the server-side event to determine if the tab should remain on the current one, but on the client-side you can handle the OnClientTabSelecting and cancel the event so it remains on the current tab.

    Help Topic On Client-Side Event:

    I hope that helps.
  3. Telerik UI for ASP.NET Core is out
  4. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 29 Jun 2011 Link to this post

    Hi Cori,

    OnTabClick is server-side so the cancellation needs to be server-side.  Can I only set the tab to what it already was and not cancel the event?

  5. Answer
    Veronica avatar
    1213 posts

    Posted 30 Jun 2011 Link to this post

    Hi Craig,

    You can use a hidden field to store the previous state on OnClientTabSelecting client-side event and perform the needed checks in the OnTabClick server-side event. That way if the condition in the OnTabClick server-side event is not satisfied - you can access the value of the hidden field and return to what it already was.

    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Daniel
    Daniel avatar
    16 posts
    Member since:
    Jun 2013

    Posted 04 Mar 2014 in reply to Craig Wallace Link to this post

    Hello Mr Craig Wallace,

    I have submitted the same question with my workaround:

    Today Mr Shino notice me than my question is dup. I don't delete it because it has workaround code.

Back to Top