template for tabstrip content

7 posts, 1 answers
  1. JCSCo
    JCSCo avatar
    16 posts
    Member since:
    Jun 2014

    Posted 17 Sep 2014 Link to this post

    I have a remote dataSource with about 20 different values. I have one value being used as the dataTextField for a tabstrip. I would like to use the rest of the values in the content of the tabstrip (perhaps in a template). Is there an example somewhere of this being done? all the documentation I can find shows simple text data with a single value in the content. I need to be able to edit multiple values in the content of the tabstrip. any help is appreciated.
  2. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 19 Sep 2014 Link to this post

    Hi JCSCo,

    This behavior is not supported out of the box, however it could be achieved using a custom solution. For example, the TabStrip's select event could be utilized to get the dataItem corresponding to the selected tab and passed to a template. The result could then be used to populate the tab's content, as shown in this example.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. JCSCo
    JCSCo avatar
    16 posts
    Member since:
    Jun 2014

    Posted 19 Sep 2014 in reply to Alexander Popov Link to this post

    Thanks, this looks like it will do the trick.
  5. JCSCo
    JCSCo avatar
    16 posts
    Member since:
    Jun 2014

    Posted 24 Sep 2014 Link to this post

    Hi Alexander,

    I have successfully created a template using your example as a guideline for static data. However, I have to add some numeric text boxes and drop down lists to the template and I'm not sure how to. All the examples I could find use MVVM and data-attributes, which don't seem to work in this scenario. Is there a way to include numeric textboxes and drop down lists to the template in your example, or would it be better to reconfigure the template to use MVVM. and if so, is there an example available?

    Thanks
  6. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 26 Sep 2014 Link to this post

    Hello again,

    Here is an example how you could use the MVVM approach to initialize widget from the template.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. David
    David avatar
    1 posts
    Member since:
    Mar 2015

    Posted 03 Apr 2015 in reply to Alexander Popov Link to this post

    Alexander:

    How would you force the first tab to show in this example?  Thanks!

  8. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 06 Apr 2015 Link to this post

    Hello David,

    The simplest approach would be to call the select method right after the TabStrip has been initialized. For example: 
    $("#tabstrip").kendoTabStrip({
        ...
    });
    $("#tabstrip").getKendoTabStrip().select(0);

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready