Click here to Skip to main content
15,881,879 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
Not that I would normally do this, I'm actually just goofing around with .NET's DataGridView...

but I have class, Person, that has a List<Address> as a property.

I'm creating a BindingSource with a
DataSource=new List<Person>();


OK, fine, the grid displays the properties in Person. But gee, wouldn't it be snazzy if the grid were smart enough to also expose Address as a drill down for each Person record?

I suppose that's asking for too much, right? I'll be very curious if DevExpress' grid supports the behavior that I want. Does anyone know if .NET's DataGridView supports this concept though?

Thanks!

Marc
Posted
Updated 16-Jul-11 7:43am
v4

1 solution

AFAIK the DataGridView doesn't support this functionality OOTB, but you can of course add it. Unfortunately this control doesn't have an event like the webform onrowdatabound event where you could just add the child rows when detected. I guess you'd have to do it the OnPaint, or maybe RowPrePaint?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900