Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Grouping Combobox Column
posted

Hi ,

I have an unbound field on my grid, and this field is templated to combo box using the CellValuePresenterStyle. Im binding the my combobox to IDictionary<int,string> items source. When I make a selection and group that column , the grouping will always display one group regardless of my selection.I figured its because the CellValuePresenter Value is null, so  I tried to bind the CellValuePresenter in the combo box to the selected Text as follows:

 Text="{Binding RelativeSource={RelativeSource AncestorType=DataPresenter:CellValuePresenter,Mode=FindAncestor},Path=Value,

UpdateSourceTrigger=PropertyChanged,Mode=OneWayToSource}"

This started to work , however when I tried to bind the ComboBox Value to the a property of the item source , the grouping doesnt work anymore. Please refer to the attached project for more illustration. When you run the project try to run it without binding the Value property of the combobox , then with binding it, and see how the grouping behaves

Thanks

 

GroupingComboBoxColumn.zip