Current filter:
                                You should refresh the page.
                                0
                                  • Hi,

                                    I have a view page that contains a PageControl. I included in each tab a partial view with Html.RenderAction because each partial view is a submit form, I used a CallBackRouteValues
                                    during the navigation through the tabs.

                                    - Why can't I use Html.RenderPartial to render form in each tab. When I do that, input button does not fire a HttpPost action ?
                                    - Is it a good idea to use the CallBackRouteValues during navigation through tabs or is there a better way to do that ?
                                    - When I use Html.Partial to render a partial view, it does not display the view content but it only shows a blank page ?

                                    The global issue is that tabs contents are loaded when the tab is clicked using callback. So when I click on a tab it also fires the post action. What should I do to associate the callback navigation tabs to a specific get action and the submit button to another post action?

                                    Thank you for your help.

                                0

                                Hello Tarek,

                                All callbacks are asynchronous queries that are sent via POST requests. That is why your code raises post actions.
                                You mentioned that Html.Partial does not work fine for PageControl. Would you please illustrate the issue with a small sample? I need to know how you are using our extensions to get a blank page instead of a proper tab.

                                Thanks,
                                Vest

                                0

                                Hello Vest,

                                Thank you for your quick reply. Please find attached a small sample to illustrate what we are trying to accomplish.

                                Actually, we are starting a new ASP.NET MVC project and we wanted it to be a full DevExpress ASP.NET MVC project and that's what we chose on Visual Studio 2010 from the projects list.

                                In fact, we would like to use only callbacks for improved performance and better look & feel. The problem is that we are trying to figure
                                out how we can manage different callbacks (tab click, button, GridView Binding, GridView paging, Callback Panel, etc.) within the same view and associated to the same controller.

                                For instance, we have a "Details" tab that fires a callback after which its content is loaded. This content contains a ComboBox which is also populated during the rendering of the other controls, then we also have a submit button that fires a callback after which a create method is executed to add a new client. By the way, how can the callback be activated on a button?

                                Thank you in advance

                                Callback_Actions.zip
                                0

                                Hello Tarek:

                                Thank you for the sample. We need time to test it and find an appropriate solution, so please accept our apologies for the delay in responding.
                                We will keep you informed of any progress.

                                Thanks
                                Kate.

                                0

                                Hi Tarek,

                                Unfortunately, we could not start your project, because we do not have some sample data. But we have reviewed the sample that demonstrates your scenario.
                                If you use our control that supports callbacks, you need to use separate Partial View with this extension. This way, conflicts between different callbacks of MVC extensions don't occur. If you want to perform a callback by clicking on a button, call the client function such as tabControl.PerformCallback().

                                Thanks,
                                Maxim E

                                0

                                Hi Maxim,

                                Apparently my question was not clear.

                                Anyway, is it possible to navigate through a PageControl tabs by adding URL parameters (?action=edit&id=5) ?
                                In that case, I am not sure it is a good idea to have the action being part of the URL parameters. For instance I have a partial view associate to one tab, and this same partial is used for both actions create (add new entry) and edit (update an existing entry). From a MVC best practise point of view, is it better to have different partial view for each action and both views are loaded within the same tab depending on the requested action?

                                What is the best way to accomplish this task.

                                Thank you in advance,

                                0

                                Hello Tarek,

                                Thank you for your reply.
                                We need time to review the issue in light of your clarification. We will contact you once we have any results.

                                Best regards,
                                Vladimir

                                0

                                Hello Tarek:

                                PageControl allows you to pass the active tab index to the controller and return the required PartialView according to this index.
                                Please check the following report in which we have discussed a similar problem:

                                How to use PageControl with different PartialViews

                                Thanks
                                Kate.

                                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.