I have a model class which have as a property, the list of details table related to it.
Ex, my master table contains datas about the package (date, cost, number)
And the detail table contains datas about pieces in the package (length, number, qte, width...)
I have already bound my master table to a datagridview with :
dgvAssemblages.DataSource = bsAssemblage
For Each objTmp As Object In lstTmp
bsAssemblage.Add(objTmp)
Next
bsAssDet.DataSource = bsAssemblage
'bsAssDet.DataMember = "Details"
Here, bsAssemblage is the master bindingSource and bsAssDet is the Details one.
I don't understand the datamember thing, I understood that I've had to put in it the name of the table but it only works if I put in the name of a field...
Also, it bugs if the bindingSource is empty so I have to check if empty before binding it :S
So, I've already had the details grid to fill with an Event (OnEnter) but I've seen it should be possible to have it bind itself automatically...
Anyone can help me with this, maybe explaining a little bit hoe datamember should work :S
Thanks in advance!