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,
In the ComboBoxColumn set the SelectedValuePath and DisplayMemberPath properties.
Let me know if I can provide any further assistance.
Hello Duane,
I set the displamemberpath and selectedValuePath to property "Rue" but it doesn't work either.
For filtering you should use a bound column. I have attached your updated sample using a Template Column as opposed to an Unbound Column.
Please let me know if this resolves your issue.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Valerie,
Thanks for your help I could achieve my goal with all your answers.
I still have a question, why can't we apply filter on an UnboundColumn when the property AllowFiltering is set to FilterMenu ?
Obviously it's possible when this property is set to FilterRowTop (according to the topic : http://help.infragistics.com/NetAdvantage/Silverlight/2012.2/CLR4.0/?page=xamGrid_Create_a_Custom_Filter.html).
FilterMenu with Unbound Column is unsupported since 10.1.
Please let me know if you have any questions.
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.
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.
Thank you for sharing your solution.
Sorry for the late answer, I found a solution by adding a partial class with my data where I put a property that represent what I need.
With this I can use a TextColumn and filter it.
Thanks for your help.
Do you have any other questions on this matter?
The issue is that the underlying value of the cell does not contain the full text that is populated during the display using the converter. Therefore when filtering, the filter is taking the value displayed in the listbox (ex Nom + Prenom) and trying to compare this to the partial value in the cell (ex Nom). Using MVVM the idea would be that your data is represented as it is maintain in your model and then the classes can be refactored in your ViewModel to support binding to the view. This would be your best and simplest approach to resolving this issue.
Thanks for your response. But I can't change my data representation, so I tried a last solution by taking one of yours (http://es.infragistics.com/community/forums/p/59382/301863.aspx#301863). It could be a solution for me but I have some troubles with it :
- The filters are not applied correctly,
- The ClearFilters button doesn't works,
- The empty data text appears some times,
- The select all checkbox behavior doesn't works.
What am I doing wrong ?