我需要SortOrder
在GridEx中设置属性,而这个属性只有get
.
我能做些什么?
编码:
private void M_Grid_ColumnHeaderClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
{
if (e.Column.DataMember == "Filed1")
{
var list = m_Grid.DataSource;
if (e.Column.SortOrder == Janus.Windows.GridEX.SortOrder.Descending)
{
list = list.OrderBy(p => p.ParticipationDate).ToList();
e.Column.SortOrder = Janus.Windows.GridEX.SortIndicator.Ascending;// it's not good
}
else
{
list = list.OrderByDescending(p => p.ParticipationDate).ToList();
e.Column.SortOrder = Janus.Windows.GridEX.SortIndicator.Descending;// it's not good
}
m_Grid.DataSource = list;
}
}