Databinding a list (in an object) to a combobox in VB.net

Posted by Casey on Stack Overflow See other posts from Stack Overflow or by Casey
Published on 2010-01-11T17:03:06Z Indexed on 2010/05/29 5:02 UTC
Read the original article Hit count: 163

Filed under:
|
|

VB 2008 .NET 3.5

I have a custom "Shipment" object that contains a list of "ShippingRate" objects. This list of "ShippingRates" is accessible through a property "Shipment.PossibleShippingRates." That property simply returns a copy of the list of "ShippingRate" for that particular Shipment.

My UI layer receives a list of "Shipment" objects from the BLL. This list is databound to a datagridview, and shows details relevant to the Shipment such as Shipping Address, etc.

I want to bind the "Shipment.PossibleShippingRates" property to a combobox, such that when the user changes the grid row, the combobox reflects the "PossibleShippingRates" for that "Shipment."

In addition, I need a way to store the "ShippingRate" they selected from the combobox for later use.

I have tried a few ideas, but none of them work properly. Any ideas on how to do this?

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about databinding