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

Kendo Menu and Partial View URL Routing

1 Answer 185 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Ori asked on 30 Mar 2017, 08:31 AM

I have here a MENU which would show partial views as the content. The function openPatientDetails is a switch statement that basically just adds a class to those divs that I want to hide and removes the class to those divs that I want to show. So every time I click from the Menu which adds/removes the hidden class, I also need the url to change without reloading the browser and every time I click back or forward it should go to the partial view that I am supposed to be. I tried the history.pushState but it's so static because I need to do it for all of the tabs. Is there any way to solve this issue?

<div class="panel-body">
    <div id="row_menu" class="row" style="margin-top: -15px;">
                .Items(items =>
                    items.Add().Text("Patient Information").Selected(true).Enabled(false);
    <div id="PatientInformationPanel">
        @Html.Action("ShowPatientInformation", "Patient")
    <div id="PatientInsurancePanel" class="hidden">
        @Html.Action("ShowPatientInsurance", "Patient")
    <div id="PatientYearPanel" class="hidden">
        @Html.Action("ShowPatientYear", "Patient")
    <div id="CasesPanel" class="hidden">
        @Html.Action("ShowPatientCases", "Patient")
    <div id="PatientDocumentPanel" class="hidden">
        @Html.Action("ShowPatientDocuments", "Patient")


function openPatientDetails(e) {


1 Answer, 1 is accepted

Sort by
Ivan Danchev
Telerik team
answered on 03 Apr 2017, 07:45 AM
Hello Ori,

I am not sure how the issue you are facing is related to the Menu and its functionality. The Menu items have an Action method: 
.Action("Construction", "Home");
that allows the specified action in the controller to be called. That's the built-in Menu functionality with regard to calls to the server. What result (view) will the called action return would depend on the specific scenario and application logic. The same is valid for routing and browser history, which are not related to the Menu's configuration, API or features.

Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question