WPF DataGrid A column with multiple bindings after the column sort is invalidated Share | 2011-07-14 10:59hdongq | view 1031 times reward:
A column in the WPF DataGrid uses multiple bindings, but the column sort fails, and clicking on his list header cannot be sorted. The XAML is as follows:
<datagridtextcolumn width= "" header= "{res:localize Flexem.Studio.HMIControls.AddressLabel.DataType}" >
<DataGridTextColumn.Binding>
<multibinding converter= "{StaticResource datatypeconverter}" >
<binding path= "Addressinfo.addresstype"/>
<binding path= "Addressinfo.datatype"/>
</MultiBinding>
</DataGridTextColumn.Binding>
</datagridtextcolumn?
2014-09-22 10:44 netizens adopted
Dig a grave.
If you just need to restore the original sort, you don't need to be so troublesome.
Just add the Sortmemberpath setting to the column.
such as <datagridtextcolumn sortmemberpath= "Addressinfo.addresstype
".............../>
WPF DataGrid A column is not sorted by using multiple bindings, and the column is joined with the Sortmemberpath setting.