Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Is there a way to create a custom window to appear below the current row in a GridView?

                                    For example, I have a partial view called "RowDetailPartial" that I want to appear where the inline editing would be when the user clicks a hyperlink inside a cell.

                                    Like I would have a cell that says, "Expand for details" and when the user clicks on it, it expands the row and pulls in the partial view. I hope this is easy enough to understand. Thanks..

                                0

                                Hello Asa,

                                Thank you for contacting us. Yes, it is possible.
                                You can define a custom EditFormTemplate via the GridViewSettings.SetEditFormTemplateContent method and load the "RowDetailPartial" PartialView when an end-user starts editing a corresponding row.

                                Please take a look at the following online demos to learn more on how to define the required layout:
                                Grid View - Inline Editing (Templates)
                                Grid View - Master-Detail

                                The full source code is available on a machine where DXperience is installed:
                                C:\Users\Public\Documents\DevExpress 2011.2 Demos\Components\ASP.NET\MVC\CS\

                                Thanks,
                                Mike

                                0

                                Thanks for the reply.

                                Is there a way to trigger the expand using a link from any cell in the row?

                                0

                                Hello Asa,

                                Please use recommendations from the Q369594 - MVC3 Grid View - Inline editing using SetDataItemTemplateContent report to accomplish this task.

                                Thanks,
                                Mike

                                0

                                I tried implementing this using the suggestion that you mentioned. I am running into issues again with passing parameters. Here is my code.

                                Here is the code for the edit form template on my gridview:

                                s.SetEditFormTemplateContent(c =>
                                {
                                    @Html.RenderAction("LevelLimits", new { id = DataBinder.Eval(c.DataItem, "EOCProgramLevelID") });
                                });

                                Here is the controller action:
                                [HttpPost]
                                public PartialViewResult LevelLimits(int id)
                                {
                                     // code
                                }

                                The id variable is null and when I look in the request it looks like a bunch of devexpress generated keys and values that don't make sense to me. How can I receive this id value?

                                0

                                Nevermind, I found a solution. I used:

                                public JsonResult LevelLimits([ModelBinder(typeof(DevExpressEditorsBinder))] MyObject s){

                                }

                                0

                                I have another question. :)

                                Here is the code to load by controller action into the edit form template:

                                s.SetEditFormTemplateContent(c =>
                                {
                                    @Html.RenderAction("LevelLimits", c.DataItem);
                                });

                                I have some javascript on the page in the view associated with that action, but the javascript code does not execute.

                                <script type="text/javascript">
                                    alert("something");
                                </script>

                                When the action gets loaded, I never get an alert box. Why is this?

                                0

                                Hello Asa,

                                Thank you for your update. Our team is dedicated to addressing all your concerns. In order to better serve you and track multiple questions from your inquiry, we have taken the liberty of separating the issues you addressed. For quick and efficient responses to your concerns, we kindly request that future inquiries address one issue at a time. Your time and cooperation are appreciated.

                                >>I have another question. :)

                                I have created a new ticket to discuss this issue:
                                Q282498 - GridView - How to specify custom EditFormTemplate with JavaScript inside

                                Regards,
                                Mike

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners