DataGridView Glyphs

  • Thread starter Thread starter jw56578
  • Start date Start date
J

jw56578

Is anyone aware of a way to make multiple glyphs show up.
I"ve set all column's sortmode to programmatic and assigned each
column a sort glyph direction, but only the first one shows up
 
You can force the sort glyph to paint by setting th eproperty in the
CellPainting event.

void dataGridView1_CellPainting(object sender,
DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex == -1 && e.ColumnIndex > -1)
{

dataGridView1.Columns[e.ColumnIndex].HeaderCell.SortGlyphDirection =
SortOrder.Ascending;
}
}

The above code sets all the glyphs in the same direction. You would
need to track the columns and directions and specifically set the
glyphs you want to see.

=====================
Clay Burch
Syncfusion, Inc.
 
that works perfectly on that event, but it is not succesfull when
called on the OnColumnHeaderMouseClick event


protected override void
OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)
{
if (e.RowIndex == -1 && e.ColumnIndex > -1)
{

dataGridView1.Columns[e.ColumnIndex].HeaderCell.SortGlyphDirection =
SortOrder.Ascending;
}
}

which is when i would like the glyphs to appear
 
Back
Top