Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2725
Javascript Change tab
posted

Hi

 

   Frustrated here tryng to do one of the most common things possible in JavaScript for WebTab. Change the tab. Can't find it anywhere.

 

Gary

Parents
  • 5368
    Suggested Answer
    Offline posted

    Here you go... the trick is to use the set_selectedIndex function.

    function

     

    OpenSomeTab() {

        var wt = Infragistics.Web.UI.WebTab.find("WebTab1");
        wt.set_selectedIndex(3);

    }

  • 5368
    Offline posted in reply to Gary

    It is in the help....

    http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebTab~Infragistics.Web.UI.WebTab_properties.html

    If you click on the SelectedIndex property, you will see the get_selectedindex() and set_selectedindex() functions that support the property.

    That's not how I found it though when I needed it.  I agree with you that the documentation is useful only as a reference, and not very helpful when you are trying to find out "how to do something". 

    For the life of me, I don't know why the CSOM documentation is so unhelpful.  I think their goal was to provide a reference, not a manual.  When we are trying to learn something, we often need a manual instead of a reference.  If you are trying to learn Portuguese, reading a Portuguese dictionary just isn't going to be the best way to go about it.

    True, it lists the class definitions, but it's in a nested format that's hard to navigate, and it's very hard to find out "how to do something".  It wouldn't take much for Infragistics to add a "how to do common tasks" page to the documentation for each control in the CSOM.

    Personally, I use the WebScriptManager on my pages so that I have Javascript Intellisense.  If I want to know how to do something, I will often just use Intellisense and a little trial and error.  If that doesn't give me the solution, I'll go open an instance of IE and drop into debug mode to play with the Infragistics objects.  Usually either of these methods are faster to find a solution than the documentation.

    It seems to me that Infragistics would be well served to add a "community" element to the documentation, so that we could contribute code samples that others could view... and the samples would be organized and categorized as part of the documentation.  Such a move would have my hearty support.

Reply Children
No Data