Problem:
Solution:
Here are the most straightforward approaches to solving this problem:
1) Load the required partial views via the jQuery.ajax function by using the approach illustrated in the E4063 - How to use the jQuery.ajax function with DevExpress MVC Extensions code example.
2) Or, use our CallbackPanel extension and the MVCxClientCallbackPanel.PerformCallback(Object) method.
In both scenarios, you need to handle the client-side ASPxClientNavBar.ItemClick event and initiate a parametrized callback (ajax or CallbackPanel-specific) to the appropriate controller's action method on the server side and get the required partial view.
Note that if you are working with regular (full) views instead of partial views, follow the approaches described in the KA18732 - How to open external Page / View in a Splitter Pane KB article and examples linked to this article.
See Also:
KA18923 - The SetContent method - How to define a content using different syntax constructions
I created a new MVC application by using the ASP.NET MVC Web Application template from the Template Gallery (see also: Project Wizard). After that, I added several custom partial views and want to load them dynamically when an end-user clicks a specific item of the NavBar extension in the ContentLeftPartialView.cshtml partial view. What should I do?
Solution:
Here are the most straightforward approaches to solving this problem:
1) Load the required partial views via the jQuery.ajax function by using the approach illustrated in the E4063 - How to use the jQuery.ajax function with DevExpress MVC Extensions code example.
2) Or, use our CallbackPanel extension and the MVCxClientCallbackPanel.PerformCallback(Object) method.
In both scenarios, you need to handle the client-side ASPxClientNavBar.ItemClick event and initiate a parametrized callback (ajax or CallbackPanel-specific) to the appropriate controller's action method on the server side and get the required partial view.
Note that if you are working with regular (full) views instead of partial views, follow the approaches described in the KA18732 - How to open external Page / View in a Splitter Pane KB article and examples linked to this article.
See Also:
KA18923 - The SetContent method - How to define a content using different syntax constructions