Child Collections: MappingName and TableStyles for a DataGrid

Posts   
1  /  2
 
    
Posts: 11
Joined: 29-Apr-2005
# Posted on: 06-May-2005 00:45:36   

Ok, figured out the first question from 2 posts above. With collection classed, the mappingname to use is the name of the collection class, ie CustomerCollection. It's different with Typed Lists. For example, I have a typed list named VideoPresentersTypedList. The correct mappingname for this is VideoPresenters. Just remove the 'TypedList' ending from the name of that class and you're good to go.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39873
Joined: 17-Aug-2003
# Posted on: 06-May-2005 11:57:36   

The grid calls ITypedList.GetListName. In the case of a typed list class, this is handled by the DataView of the datatable which a typed list is, and that routine returns the table name.

It's a bit of a mess, I fully admit. The problem is that this info is not documented anywhere in the .NET docs, and therefore I didn't take proper precautions when designing the code. In fact this is only documented by some hungarian programmer who has spend a lot of time decompiling hte databinding code.

For example, in Adapter, the listname is always "", which is a pain, because I accidently (because I wasn't aware of the fact that the listname was actually used!) forgot to implement that, and I found that out 6 months after the release of adapter. The problem though was that I couldn't fix it anymore, because as soon as I would return something else than "", all code already using it would break. disappointed

Frans Bouma | Lead developer LLBLGen Pro
1  /  2