У меня есть сетка данных с некоторыми программно сортируемыми столбцами, сама сортировка выполняется по щелчку мыши.Я могу получить свойство направления gliph, но глиф не отображается.
Есть идеи почему?
private void gvRules_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
var column = gvRules.Columns[e.ColumnIndex];
var sortGlyphDirection = column.HeaderCell.SortGlyphDirection;
if (column.SortMode != DataGridViewColumnSortMode.Programmatic)
return;
switch (sortGlyphDirection)
{
case System.Windows.Forms.SortOrder.None:
case System.Windows.Forms.SortOrder.Ascending:
gvRules.Sort(column, ListSortDirection.Ascending);
break;
case System.Windows.Forms.SortOrder.Descending:
gvRules.Sort(column, ListSortDirection.Descending);
break;
default:
break;
}
}