all groups > dotnet windows forms > june 2007 >
You're in the

dotnet windows forms

group:

DataGridView Glyphs


DataGridView Glyphs
6/30/2007 8:34:16 PM
dotnet windows forms:
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
Re: DataGridView Glyphs ClayB
7/2/2007 1:03:44 AM
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.
Re: DataGridView Glyphs
7/3/2007 12:00:00 AM
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


[quoted text, click to view]

AddThis Social Bookmark Button