LLBLGen SuperType Entities in a DataGrid - What DataGrid will work?

Posts   
 
    
cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 05-Jul-2009 15:32:39   

Hi, I am now hitting the 'Object Type Match' errors when using a regular ASP.net DataGrid with an EntityCollection of SuperType Objects. After reading some posts I believe the issue has been identified (See Below). It seems that with an EntityCollection of SuperTypes (BaseTypes)...The MS Grid will not work - due to bad code at MS. (DataList-Same thing)

Ok-To cut to the chase...I need to use a DataGrid. Can someone recommend a Third-Party DataGrid or DataList product that will work with an EntityCollection of SuperTypes?

Thanks

http://llblgen.com/TinyForum/Messages.aspx?ThreadID=6812&HighLight=1 etc

cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 05-Jul-2009 23:52:42   

Found Telerik & Essential Objects work well.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 06-Jul-2009 09:58:15   

Any 3rd party control should work. You just have to realize that a grid is a list of columns and a list of rows, and almost all grids simply look at the type of 1 row or ask the type of 'the rows' to the collection and display columns based on that. I.o.w.: they expect all rows to be of the same type. If you bind a collection with different types, expect problems because that's not how databinding with grids works in general (i.e.: how Microsoft intended it to be and also how it works logically).

This is also in the manual, btw. http://www.llblgen.com/documentation/2.6/hh_goto.htm#Using%20the%20generated%20code/Adapter/Databinding%20at%20designtime%20and%20runtime/gencode_databinding_adapter.htm

Frans Bouma | Lead developer LLBLGen Pro