Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Binding on objects
posted

Hi.

 I am using a ultraComboEditor on a detailview showing an order object.

I am using Linq for Sql, and I am having a Order and a OrderState objects that I would like to bind together.

On the detailView for the Order object I would like to have an UltraComboEditor, in which it is possible to set the state of the order. The datasource of the UltraComboEditor would be a bindingSource containing OrderState objects.

Normally i would setup the datasource bind the UltraComboEditor using the foreignKey id on the order object, and set the ValueMember of the UltraComboEditor to the primaryKey of the OrderState.

That normally works fine. But in Linq for SQL it is not possible to change the foreignKey Id on the Order (OrderStateId) object if the corresponding  OrderStatus object already has been loaded.

So my questions is: How can I bind through the Order object's OrderState object instead of the OrderStateId? In WinForms Combobox it is possible to bind through the SelectedItem property.

 

Best Regards!

Dennis Tycho Nielsen

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Dennis,

    If you have the latest hot fix, you can set the ValueMember to Infragistics.Win.BindableValueList.USE_LISTOBJECT_AS_VALUEMEMBER.

     

Reply Children
No Data