datagrid combo

Jan 23, 2009 at 12:42 PM
Hi

I have a question regarding the comboboxcolumn.

I have an observable collection with the 3 fields value,description,and valueANDdescription

In the datagrid I'd like to see only the value part, but when opening the combo, I'd like to see the description or valueANDdescription





In vinsibals examples I found
- a combo that shows the value and selects using the value part
- a combo that shows the description and selects using the description part and fills the value TO ANOTHER COLUMN

I want a combo that shows the value and selects using  the description part, but fills itself with newly selected the value

Is there any example on this?

Regards
Klaus
Coordinator
Jan 27, 2009 at 5:39 PM
Try using SelectedItemBinding (instead of SelectedValueBinding), SelectedValuePath and DisplayMemberPath. 
Jan 28, 2009 at 3:05 PM
Vincent
thanks for your hint, but may I just did not get it.
I send you a very small demo which shows data from a list of objects with two fields: name and status
I included 3 combobox columns using selectedvaluebinding, selecteditembinding and textbinding which all bind to a object list consisting of properties keyvalue , keydesc and valueanddesc
What I am searching for is a solution to have ONE combobox that
- displays the status (without description) = keyvalue (like column status or combo/textbinding when combo is not opened
- when combo is opened: display valueanddesc in dropdown, and change the status when one is selected
Thanks for your support
Klaus

From: vinsibal [mailto:notifications@codeplex.com]
Sent: Dienstag, 27. Januar 2009 19:39
To: Klaus Wiesel
Subject: Re: datagrid combo [wpf:45061]

From: vinsibal

Try using SelectedItemBinding (instead of SelectedValueBinding), SelectedValuePath and DisplayMemberPath.