Can I simulate clicking on tab?

9 posts, 0 answers
  1. Andreja Zitnik
    Andreja Zitnik avatar
    2 posts
    Member since:
    Jan 2010

    Posted 27 Jan 2010 Link to this post

    Hi,

    I have a RadTreeView and a RadTabStrip. When I click on a tab, some content displays below it in a PlaceHolder.
    I would also like for some nodes in RadTreeView to do exactly the same - for example node Stations would select tab Stations (I already figured out how to do this using JavaScript) and I also want it to display the content that goes with the tab, but nothing shows up
    .
    When I do tab.select() in JavaScript, the correct tab is selected, but there is no postback. How can I make the tab do a postback so that effect will be the same as clicking on it?

    Thank you,
    Andrea
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 27 Jan 2010 Link to this post

    Hi Andreja Zitnik,

    All Telerik controls for navigation expose a click() client method for their items(nodes or tabs). You can view a demonstration of this method which causes a server side postback here:
    http://www.telerik.com/support/kb/aspnet-ajax/window/using-radprompt-and-radconfirm-with-telerik-navigational-controls.aspx

    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andreja Zitnik
    Andreja Zitnik avatar
    2 posts
    Member since:
    Jan 2010

    Posted 27 Jan 2010 Link to this post

    I actually tried tab.click(), but because I did a tab.select() before that, it didn't do anything. Well, it works now :)

    Thank you,
    Andrea
  5. Gabriela
    Gabriela avatar
    5 posts
    Member since:
    Apr 2014

    Posted 17 May 2014 Link to this post

    Hi,

    I have an issue regarding a tabstrip with 3 tabs, using MVC. I am trying to load 'in advance' the content of tab2 and tab3 when tab1 is loading (to reduce the time spent at loading if the user remains more on tab1).

    I have seen in this thread you recommend the tab.click() method, can you provide a short example on how to use this, suitable for my scenario? In the previous example (http://www.telerik.com/support/kb/aspnet-ajax/details/using-radprompt-and-radconfirm-with-telerik-navigational-controls) there is no real reference to the tabstrip control.

    Thank you.

    Best regards,
    Gabriela
  6. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 22 May 2014 Link to this post

    Hello Gabriela,

    I have prepared a sample page for you, base on the referenced article and implementing the solution using the RadTabStrip control. You could find it attached and test the behavior at your end.

    Regards,
    Nencho
    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.

     
  7. Gabriela
    Gabriela avatar
    5 posts
    Member since:
    Apr 2014

    Posted 22 May 2014 in reply to Nencho Link to this post

    Hi Nencho,

    Thank you for the example you provided.
    Can you please let me know if there is any way to check if a tab in the TabStrip has been fully loaded. From what I see, we can only use OnLoad, OnError, OnSelect and OnContentLoad events. I would need to be able to command loading a tab only after another one has been fully loaded. I don't know the duration of loading each tab (otherwise I would have used a setTimeout function).

    Thank you.

    Best regards,
    Gabriela
  8. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 27 May 2014 Link to this post

    Hello Gabriela,

    You could use the OnClientLoad client-side event to capture when the control and the Tabs are fully initialized on the client. Could you specify what concerns do you have, regarding the usage of this even?

    Regards,
    Nencho
    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.

     
  9. Gabriela
    Gabriela avatar
    5 posts
    Member since:
    Apr 2014

    Posted 05 Jun 2014 in reply to Nencho Link to this post

    Hi Nencho,

    I am using a Telerik TabStrip, not a RadTabStrip, therefore I don't have the OnClientLoad event available.

    Best regards,
    Gabriela
  10. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Jun 2014 Link to this post

    Hello Gabriela,

    What do you mean by Telerik TabStrip in this case - the tabstrip widget from our Telerik UI for ASP.NET MVC suite? If so, you may be interested in reviewing this example:
    http://demos.telerik.com/aspnet-mvc/tabstrip/ajax

    Furthermore, for additional customizations you can use the document.ready handler where the tabstrip widget is already fully loaded. See the html version of the same demo for reference:
    http://demos.telerik.com/kendo-ui/tabstrip/ajax

    Regards,
    Sebastian
    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