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.
Thanks for your answer but all those things are already done in the template and it doesn't work.
Could you provide me a sample, please.
P.S. : The most important thing is that filters are not applied when clicking Ok.
I looked over your issue and believe this can be resolved with a few minor modifications to your original sample. In order for filtering to work on the complex object you can implement IComparable on the object itself. Then in order to have the distinct values display meaningfully in the drop down you can override the ToString() method to display the value you would like to see displayed.
I have attached a sample illustrating this.
Please let me know if this resolved your issue.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Were you able to resolve your issue?
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
Hello Valerie,
I was on holidays last week so I only could test your solution this morning, it seems to work I'll be back on it if I have further problems.
Thanks a lot for your help.
Regards and best wishes for this new year.
I'am back on my problem. This time I need as before a TemplateColumn to have different visual state (consulting and editing) and I have a Column shows int value.
I use a converter to show the string's match of the int values, in the FilterDialog I would like to show the string values. How can I do that ?
P.S. : I attached a sample with a screenshot.
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.
Please let me know if you have any questions.
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 ?