BindingSource and EntityCollection returns empty records

Posts   
 
    
pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 30-Mar-2009 16:51:30   

Hi:

I am starting a WinForms app in VS2008 and using BindingSource with EntityCollection. When I selected the BindingSource for the DataSource of the Telerik Grid, it shows empty records at the run time.

When I tried to connect directly to the database, the same BindingSource shows all the records fine.

I am using LLBL 2.6 with Runtime Lib of August 11, 2008.

Please advise.

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 31-Mar-2009 05:47:13   

Mmm. Would be helpful if you post more info about the problem or attach a mini-repro solution we can run (without dlls, just the project and some DDL).

David Elizondo | LLBLGen Support Team
pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 31-Mar-2009 10:35:10   

Here it is...

  1. Copy LLBLGen DLLs to \Bin
  2. Run the solution from the folder \TestLLBLGen-WindowsForms

Thanks in advance.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 31-Mar-2009 11:00:07   

You should fetch the EntityCollection.

pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 31-Mar-2009 12:47:31   

Walaa:

I am moving from Web to Winforms.

And in Web, when you assign the Datasource to the Grid, it immediately shows the Columns for us to customize the look at the design time.

We are looking to do the same in Winforms.

Is that possible?

Thanks.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 31-Mar-2009 21:03:42   

Most grids support this - with some you have to click a "Retrieve Structure" button somewhere to tell it to fetch the column layout from the data source.

Which grid are you using ?

Matt

pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 02-Apr-2009 08:07:15   

I use Telerik Grid for Winforms

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 02-Apr-2009 11:03:32   

This might depend on the sequence of steps taken at Design time.

If you assign the entityCollection to the BindingSource after assignin the bindingsource to te grid, columns would not show.

Try doing the following on a new test webForm: 1- Drop an entityCollection on the Form. 2- Drop a bindingSource on the form. 3- Assign the collection to the bindingSource 4- Drop an MS Grid on the form. 5- Assign the bindingSource to the Grid.

Does the colums appear now?

pandu avatar
pandu
User
Posts: 86
Joined: 18-May-2006
# Posted on: 03-Apr-2009 08:29:41   

Yes. It does.

Thank you.