BindingSource to BindingSource

Posts   
 
    
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 15-Nov-2007 17:38:46   

I've been getting this for a while now, and just never posted on it until now. So its has been with multiple different version of llblgen. But im currently running v2.5. Runtime v2.0.50727

If you take a BindingSource and set say an OrderEntity as the datasource. Then create a secondary BindingSource for the OrderLineItems in the OrderEntity. So you would set the 2nd bindingsources datasource property to the first bindingsource, and set the datamember to "OrderLineItems". This should work and infact visual studio at times will automatically do this setup for you depending on what you select in the designer. However at runtime it doesnt work. I get no errors, and no data in my child grid.

I have tried with this with 2 grids (master-child) and also with combo boxes.

OrderEntity.OrderLineItems is a collection of lines items for the order.


//orders is fetched orders with order lines items prefetched.
orderBindingSource.Datasource = orders;
orderLineItemBindingSource.Datasource = orderBindingSource;
orderLineItemBindingSource.DataMember = "OrderLineItems";

simmotech
User
Posts: 1024
Joined: 01-Feb-2006
# Posted on: 16-Nov-2007 06:41:59   

Answer wrote:

I've been getting this for a while now, and just never posted on it until now. So its has been with multiple different version of llblgen. But im currently running v2.5. Runtime v2.0.50727

If you take a BindingSource and set say an OrderEntity as the datasource. Then create a secondary BindingSource for the OrderLineItems in the OrderEntity. So you would set the 2nd bindingsources datasource property to the first bindingsource, and set the datamember to "OrderLineItems". This should work and infact visual studio at times will automatically do this setup for you depending on what you select in the designer. However at runtime it doesnt work. I get no errors, and no data in my child grid.

I have tried with this with 2 grids (master-child) and also with combo boxes.

OrderEntity.OrderLineItems is a collection of lines items for the order.


//orders is fetched orders with order lines items prefetched.
orderBindingSource.Datasource = orders;
orderLineItemBindingSource.Datasource = orderBindingSource;
orderLineItemBindingSource.DataMember = "OrderLineItems";

Does it work if you set the DataSource to be identical on both?

orderLineItemBindingSource.Datasource = orders;
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 16-Nov-2007 10:36:17   

Please post a complete code snippet, including the fetch routine. Are you using Adapter or SelfServicing? Also we need the runtime library version used. (ref: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7717)

Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 16-Nov-2007 17:39:20   

Hmm...something else is going on here, cuase i just created a new project as an example and now its working....im going to do some some more research here and see if i cant track this down...

Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 16-Nov-2007 18:59:40   

Ok,

when using comboboxes it works using the standard .NET ones, But does NOT work when using infragistics UltraComboEditors rage

EDIT: I think this is an infragistics problem, as i am unable to get it to work correctly with a typed dataset.