Current filter:
                                You should refresh the page.
                                0
                                  • Hello!
                                    I have a tabstrip rendered like that:

                                    @Html.DevExpress().PageControl(settings =>
                                        {
                                    .................................
                                            settings.TabPages.Add("Registered Machines").SetContent(() =>
                                                {
                                                    Html.Action("Action", "Controller" new {group = Model.ID});
                                                });
                                    .................................
                                        }).GetHtml()

                                    Action loads a partial view containing only a gridview, and it works fine.
                                    If I return another view (shared partial view containing text "please log in to use it"), nothing is loaded into the tab.

                                    Furthermore, if I put an <h1>...</h1> into the partial view with grid, only grid will be shown (no <h1>).

                                    Am I using wrong syntax when I initialize the tabstrip?

                                0

                                Hello Anton,

                                Please take a look at the following Code Central Example to learn more on how to render any HTML within the nested content (such as the TabPage's content):
                                CallbackPanel (Razor View engine) - How to render a required content in the Response directly inside the SetContent method via the ViewContext.Writer
                                CallbackPanel (Razor View engine) - How to render a required content inside the SetContent method by using a custom PartialView

                                Starting with version v2011 vol 1.4, we will improve DevExpress ASP.NET MVC Extensions and it will be possible to combine the static HTML markup with the MVC Extensions definition. We will also publish the corresponding topic in our documentation, where we will describe possible ways and different scenarios of using DevExpress ASP.NET MVC Extensions within the Razor View Engine: Create a custom document to describe differences in rendering between WebForms and Razor view engines. We will release version v2011 vol 1 (build 11.1.4) within a few days. Please stay tuned to our announcements.

                                P.S. If this does not help, please provide us with a sample project, illustrating the issue and some screenshots, illustrating the expected results. We will examine it on our side and try to suggest an appropriate solution for you.

                                Regards,
                                Mike

                                0

                                Hi again!
                                Thanks for the hints, however, this does not really help in my usecase.
                                Depending on user rights, I must either return a grid (using GetHmtl), or return a View with text.
                                As far as I don't use WriteLineToResponse in my View, it's not rendered.

                                Anyhow, thank for the feedback.
                                Looking forward to version v2011 vol 1 (build 11.1.4), that must solve the problem!

                                0

                                Hello Anton,

                                I have created a small application using the most recent version of our control.
                                Please take a look at the new approach. Now, it is not required to use the GetHtml and Render methods separately, because both of them work in the same way.

                                In addition, we have updated our documentation, where we described how to use our extensions in the Razor engine: Using in Razor Views.

                                Thanks,
                                Vest

                                Q326429.zip
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.