Master/detail form

Hi

How can I have a master/detail layout on a win form?

Thanks

Regards

[76 byte] By [Yahya] at [2008-2-7]
# 1
Hi,
This seems to be a general question...
Are you referring to ADO.Net? or just the design interface?

1. If its ADO, lookup "How to bind controls"
2. If its the design, then take a look at the DataGrid...
cheers,
Paul June A. Domag

PaulDomag at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Does vs2005 not come with a wizard that will take the master & detail table names and turn out a master/detail form bound to the relevant tables?

Regards
Yahya

Yahya at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Yahya wrote:
Hi

How can I have a master/detail layout on a win form?

Thanks

Regards


Yahya,

First, your data set needs to have a DataRelation set between two of the tables in the set. This is what allows the master/child relationship to be established.

Once you have that, you can place two grids on your form, and then bind one grid to the parent table. The child grid, you attach to the relation, not to the child table. This is what allows only child elements to be displayed.

Hope this helps.

- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

casperOne at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...