This is a migrated thread and some comments may be shown as answers.

Auto navigate the side root

2 Answers 32 Views
SplitView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 21 Jul 2016, 03:56 PM

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 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Jul 2016, 01:18 PM
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.
0
John
Top achievements
Rank 1
answered on 26 Jul 2016, 09:53 AM

Exactly what I needed!

Thanks for your help!

Tags
SplitView
Asked by
John
Top achievements
Rank 1
Answers by
Dimo
Telerik team
John
Top achievements
Rank 1
Share this question
or