ASP.NET MVC GridView - Master-detail Grid Layout (available now in v2011.1)

Check out the new "Master-detail" layout feature of our ASP.NET MVC GridView that's available now in the DXperience v2011.1 release!:

ASP.NET MVC_GridView_Master_Detail

Unlimited Levels

Our ASP.NET MVC Grid View will support master-detail data presentation of any complexity. Which means that you can nest GridViews as deep as you need or want.

How-To Setup

The demo above shows how to create a simple master-detail relationship between two tables. All you have to do is to:

  1. Use two DevExpress MVC GridView extensions
  2. Bind the first grid (master grid) to the master data source and enable the grid's SettingsDetail.ShowDetailRow option
  3. Place the second grid (detail grid) into the master grid's detail row template created via the SetDetailRowTemplateContent method
  4. Assign a unique (dynamically generated) name to the Name property of the detail grid and set its SettingsDetail.MasterGridName property to the master grid's name
  5. Bind the detail grid to the detail data source whose data is retrieved in a controller action based upon the corresponding master row ID passed via a ViewData parameter

By default, end-users can expand several master rows simultaneously. You can control this behavior using the SettingsDetail.AllowOnlyOneMasterRowExpanded option.

Available now in v2011 Volume 1 Release

The new "Master-Detail" feature is available now in the DXperience v2011 volume 1 release.

Are you looking forward to using the Master-Detail layout for your DevExpress MVC GridView?

Drop me a line below with your thoughts, thanks.

 

Build Your Best - Without Limits or Compromise

Try the DevExpress ASP.NET MVC Extensions online now: http://mvc.devexpress.com

Read the latest news about DevExpress ASP.NET MVC Extensions

Download a free and fully-functional version of DXperience now: http://www.devexpress.com/Downloads/NET/

Follow MehulHarry on Twitter

great,you means the DXperience v2011 volume 1 will be released at April?

17 March, 2011

Du,

The DXperience v2011 vol 1 should be released around the May/June 2011 time frame.

17 March, 2011

Perfect.  Just got into MVC, and this is the only option I was worried about losing by transferring over from WebForms.  Awesome work.

17 March, 2011

Thanks Brett!

There's more news coming for our DevExpress MVC GridView. Stay tuned to this blog. :-)

17 March, 2011

Hi Mehul,

"The DXperience v2011 vol 1 should be released around the May/June 2011 time frame." Does that imply two releases per annually?

Sorry can't wait to get my hands on the next release goodies,

wish it was sooner :)...

20 March, 2011

Hi Luke,

Yes, last year, Julian our CTO announced that we were moving to a 2 release cycle per year so that we didn't have to spend so much time on testing each release and more time for features/products. :)

Thanks.

21 March, 2011

wow... great works. this is the feature that i want and need for my MVC development. can't wait to use that feature. same with Luke, wish it came sooner :)

25 March, 2011

Congratulations! Delivered as promised.

Best regards,

Peter

31 May, 2011

Thanks Fathir Mohamad!

1 June, 2011

Thanks Peter!

1 June, 2011

Sweet.  What if I want all the detail rows to display by default?

10 January, 2012

Paul,

Use the GridView.DetailRows.ExpandAllRows method.

19 January, 2012

Just getting into this and trying to copy the code in the online demo. Unfortunately, using Html.RenderAction to "place" the detail gridview into the Template keeps throwing an exception, changing that to Html.RenderPartial with the second argument as stated tells me the DataSource is not of the correct type. Can you point me in the right direction?

Thanks.

10 February, 2012

Sorry, just a followup, the issue MAY be that the Master grid is using server mode (i.e. BindToLINQ). I can't seem to find sample code for using Master-Detail in MVC3/Razor with BindToLINQ.

10 February, 2012
10 February, 2012

Please login or register to post comments.