Parent-Child relation while using object data source
Posted
by Saba
on Stack Overflow
See other posts from Stack Overflow
or by Saba
Published on 2010-05-01T06:57:13Z
Indexed on
2010/05/01
6:57 UTC
Read the original article
Hit count: 231
Hello guys I am experiencing with a class generator I've written, which generates a class for each table in database with each table field as a property and such. Before that, I used to add a typed dataset to the project and add some tables to it. It automatically detected the relationship between tables and when I added a parent table as data source of a datagrid, I could add another datagrid and use the foreing key data member of it's bindingsource to fill it, and when someone moved the focus on parent datagrid, the data in child datagrid would change accordingly. Now that I have my classes, I add an object as data source for my 2 datagrids, but obviously it doesn't detect a parent child relation. But It'd really help if I could have that foreign key relation in my object datasources. Is there any way to have that relation in object datasource?
© Stack Overflow or respective owner