我想根据多重绑定值对DataGridTextColumn进行排序 - 文本列与日期和时间绑定,因此排序操作应基于 DateTime 完成。
XMAL源代码
{!! Form::open() !!}
视图和视图模型C#源代码是
<DataGridTextColumn Header="Visit Date" CanUserSort="True" >
<DataGridTextColumn.SortMemberPath>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="VisitDate"/>
<Binding Path="VisitTime" />
</MultiBinding>
</DataGridTextColumn.SortMemberPath>
<DataGridTextColumn.Binding>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="VisitDate"/>
<Binding Path="VisitTime" />
</MultiBinding>
</DataGridTextColumn.Binding>
</DataGridTextColumn>