A very simple thing with a very annoying problem.
As explained in almost every tutorial on the web i just did this:- built and populated my DB- created an UltraGrid, ViewStyle set to MultiBand- created a new DataSet- created a parent DataTable, filled by a query. Let's call it A- created a child DataTable, filled with a query, Let's call it B. B has a foreign key referencing A's primary key- added both tables to my DataSet's Tables- created a DataRelation between A's primary key column and B's foreign key column. Here is the code:
oRel = New DataRelation("suppItems", _ds.Tables("anaSupp").Columns("anaSuppID"), _ds.Tables("anaItem").Columns("anaItemSupp_ID_anaSupp"))
- added oRel to my DataSet's Relations- set my DataSet as my UltraGrid's Datasource.
My DB is correctly populated, A and B are correctly created, oRel is created.Nonetheless when i run my project, if I click on the + icon to the left of A's rows, nothing is displayed. The same if I set A as DataSource.
Why?
Okay, problem solved.
It was just my fault, i didn't check database fields datatypes so there were no matches on child rows.