[C#]Open in popup window
private void grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) {
TableViewHitInfo info = view.CalcHitInfo((DependencyObject)e.OriginalSource);
if(!info.InColumnHeader || e.ClickCount != 2) return;
GridColumn c = (GridColumn)info.Column;
if(c.AllowSorting == DefaultBoolean.False) return;
if(c.SortOrder == ColumnSortOrder.None || c.SortOrder == ColumnSortOrder.Descending)
grid.SortBy(c, ColumnSortOrder.Ascending, 0);
else grid.SortBy(c, ColumnSortOrder.Descending, 0);
e.Handled = true;
}
本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/284.html
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/284.html