Hello,
I need to show in a comboboxcolumn two properties of a complex object.
To achieve that I used the ValueConverter but it doesn't show me anything.
I attached a sample to show you how I do it.
Regards.
Hello Coso,
Yes this method will only work if the column is bound to a complex object which contains all the fields. In your case of only having the first value, your best option may be to rearrange your data so that the values you want to combine are encapsulated into another object and this object is bound to your grid. By the changing data representation in your view model you can easily use the functionality as is in the grid without having to deal with changing styles.
I would recommend creating two complex objects for the columns (implementing IComparable and overriding ToString) and then including object in the items in the list bound to the grid.
Please see modified sample.
Let me know if you have any questions.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Valerie,
I applied your solution to my last sample but it can't work on my case. I used a converter but due to the listbox context we don't have the good object in the converter.
I attached the modified sample.
Have you tried using the second option that I suggetsed on Jan 4th:
Another option is to change the ItemTemplate used by the List Box (named itemsBox) in the FilterSelectionControl to use a converter to display the text instead of the int value as is done for the Label. When doing this, the one issue is that the List Box defined in the Style for the FilterSelectionControl is used by all columns, therefore the DataTemplate used for the ItemTemplate would need to change based on the Column. I have attached a sample illustrating this where I use the Loaded Event of the Listbox to set the appropriate DataTemplate.
I had attached a sample previously demonstrating this.
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
Thanks for your response, I tried to use a template column to filter my data but the text that appears in the filter menu dialog is the value corresponding to the key property.
To show what I want I used the ItemTemplate property to bind on the complex object that contain the property specified by the key property.
I tried the method you told me and override the ToString method of the complex object and it works but in my case I can't override this method because I use two template column.
Is there a way to show the converted value in the filter menu.
I attached a sample.
FilterMenu with Unbound Column is unsupported since 10.1.
Please let me know if you have any questions.