There is two tables in database. Tables is related with foreign key. table 1 --> datagrid 1 table 2 --> datagrid 2 datagrid 1 items is selected, Datagrid 2 shows table_2 datas.
A:
I reccomend you use Tag propery in you rows and use binding:
datagrid1.SelectedItem.Tag --------to-------> datagrid2.ItemsSource.
At thefirst datagrid set array of objects with property Tab ( with type Object ) and during them getting make query to database and return the datagrid (or inherit from them).
Don`t forget cache query ;)
Manushin Igor
2009-10-10 15:54:16