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
165
Binding two different ComboBoxFields in a XamDataGrid
posted
Good morning

So I have the following XamDataGrid

Each Combo contains a list of names and nicknames. what I need to do is when I select the nickname, the name gets selected automatically, and vise versa. So the selection of one needs to be attached to the other. 

Does anyone have any idea how I can achieve that?

  • 34810
    Verified Answer
    Offline posted

    Hello Nour,

    I have been investigating into the behavior you are looking to achieve, and in order to do this, I would recommend handling the DataValueChanged event of the XamDataGrid. Please note that in order to handle this event, you need to opt into it by setting the XamDataGrid.FieldSettings.DataValueChangedNotificationsActive property to true.

    The event arguments of the DataValueChanged event can net you the Record that has had a change as well as the Field that the value change is associated with. From this information, you can get the underlying data item from the record, and change the properties as needed.

    I am attaching a sample project to demonstrate the above.

    Please let me know if you have any other questions or concerns on this matter.

    XDGComboDependentValues.zip