Auto navigate the side root

3 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Jun 2016

    Posted 21 Jul Link to this post

    Hi there,

    I've tailored the splitview demo on the Kendo UI demo site.

    Prior to the splitview view displaying, I have an initial view asking for some information including what default category the user is interested in.

    I'm looking for a solution where I can automatically navigate the user to their selected category. I.e. #side-inbox?CategoryID=15

    This is effectively mimicking the user navigating to the split view and clicking on category 15. I will still give them a facility to go "back" so they can look at the contents of other categories.

    I've done the easy bit of navigating to the splitview using app.navigate("#splitview"); but I'm struggling to fire the default category.

    See extract of categories view on left side of the splitview:

    <div data-role="view" data-title="Categories" id="side-root" data-use-native-scrolling="true">
    <ul data-role="listview" data-style="inset" data-source="splitViewCategories" data-template="categoriesTemplate">
    </ul>
    </div>

    <script id="categoriesTemplate" type="text/x-kendo-template">
    <a href="\#side-inbox?CategoryID=#: CategoryID#" data-icon="mostviewed"><span class="daysfont">#: CategoryName #</span></a>
    </script>

    Appreciate any help,

    Thanks

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 25 Jul Link to this post

    Hello John,

    The SplitView widget renders panes that have a navigate method. Use this method to navigate to a "nested" view, which is placed inside the respective SplitView pane.

    http://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/pane#methods-navigate

    For example, please do the following test:

    - go to
    http://demos.telerik.com/kendo-ui/m/index#splitview/index

    - execute the following code in the browser's JavaScript console:

    $("#side-root").parent().data("kendoMobilePane").navigate("#side-inbox?CategoryID=1")

    Regards,
    Dimo
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  3. Kendo UI is VS 2017 Ready
  4. John
    John avatar
    2 posts
    Member since:
    Jun 2016

    Posted 26 Jul Link to this post

    Exactly what I needed!

    Thanks for your help!

Back to Top