Hi there
I have data items with the following structure
I add the collection of the items to a XamDataGrid. It displays the columns as I like (IdRelated-Text1, IdRelated-Text2 and other properties). I disabled the auto generation of the columns. Now I like to add a MultiColumnComboBox to the cells of the two IdRelated-Text columns. The multi column combobox should display the two IdRelated-Text as columns in the drop down list of the combobox. When I select an item, it should change the value of the Id column (which is hidden) and not the IdRelated-Text columns directly.
What is the best practice to do that?
ThanksRoman
Hi Stephane,
You could try using the ValueToTextConverter on TemplateField. If that doesn't help I recommend opening a new thread so we can better help you rather than reviving an existing thread. You can link to this thread to give our support team some more context.
Any answer, I still have the same issue, not able to filter with displaymember ????
Hi,
I know this post is pretty old, but at this time, with the last version of Infragistics XamDataGrid it is not, nativelly, possible to user a multicolumncombobox as a field.
This is why I use your trick (now with introducing the combobox in the TemplateField.EditTemplate section) ; it works perfecty to display and edit data, but not to sort or filter data.
Sorting and filtering data are based on valueMember not displayMember.
Have you another trick to make it work ?
Hi Roman,
Let me know if you have any further questions on this matter.
If you want that kind of behavior check out this blog post by Andrew Smith. http://ko.infragistics.com/community/blogs/andrew_smith/archive/2009/03/27/hosting-wpf-controls-in-a-xamdatagrid-cell.aspx
It has a sample that shows how you can have two sets of DataTemplates for each cell, one for edit mode and one for non-edit mode. This way you can specify to use the combo control as the edit mode control while specifying a TextBlock for the non-edit mode version.