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

Drawer content from views

1 Answer 80 Views
Drawer
This is a migrated thread and some comments may be shown as answers.
Arturo
Top achievements
Rank 1
Arturo asked on 05 Nov 2020, 06:31 PM

I've searched in the documentation but haven't been able to solve this problem so far:

I want to use the drawer component as a global navigation menu. This means that the drawer items should be clickable and redirect to different views within the solution and the view should be rendered inside the content section. 

in regards to the first problem, which is that the items should be clickable i have my template setup like this:

    @(Html.Kendo().Drawer()
    .Name("drawer")
    .Template(@"
    <ul>
        <li data-role='drawer-item'><a asp-controller='Home' asp-action='Index'>First Item</a></li>
        <li data-role='drawer-separator'></li>
        <li data-role='drawer-item'>Second Item</li>
    </ul>")
    .Mode("push")    
    )

but using the asp helpers is not working. 

and regarding showing the view inside the .content, i don't know how to make that work.

Any help will be appreciated.

 

 

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 10 Nov 2020, 04:45 PM

Hi Arturo,


Thank you for the provided details.

In order to achieve the desired behavior, I would recommend using an Ajax request. The approach implementation is fully explained in the forum post below:

Give the approach above a try and let me know if further assistance is needed.

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Drawer
Asked by
Arturo
Top achievements
Rank 1
Answers by
Anton Mironov
Telerik team
Share this question
or