RTE - Complex DataBinding accepts as a data source either an IList or an IListSource

Posts   
 
    
mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 23-May-2006 21:10:14   

All--

Please help.

When I try to bind an Entity object to a DataGrid, the following RTE appears...

System.Exception: Complex DataBinding accepts as a data source either an IList or an IListSource at System.Windows.Forms.DataGrid.set_DataSource(Object value) at FMGlobal.Research.RulesEngine.AdminClient.Windows.ProjectTestingMainForm.GetEntityFromServiceButton_Click(Object sender, EventArgs e) in C:\projects\Shared\RulesEngine\RulesEngine.AdminClient.Windows\ProjectTestingMainForm.vb:line 216

...so, it looks like an Entity cannot be bound in this way.

That's fine (I think)-- but, I just want to make sure.

Question: Is it true that it is not possible to use default data binding in .NET 1.1 to bind an LLBLGen-generated Entity to a DataGrid in a WindowsForms application?

Please advise.

FYI, we are using LLBLGen, ASP.NET, VS.NET 2003, VB.NET, .NET 1.1, the Adapter templates, SQL Server 2000, web services, SD.LLBLGen.Pro.DQE.SqlServer.NET11.dll Version 1.0.20051.51207, SD.LLBLGen.Pro.ORMSupportClasses.NET11.dll Version 1.0.20051.51214, Windows XP Pro, IIS 5.1, and so on.

Thank you.

--Mark Kamoski

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 23-May-2006 22:11:47   

Grids bind to collections, or better: to IList implementing classes. An entity is a single object, not a list. So you can't bind a grid to an entity.

Frans Bouma | Lead developer LLBLGen Pro