Hello all,
Can the individual WinGrid columns have separate fonts assigned to them in code? As an example, if I wanted to make the selected coumn header text Bold or a different color, can I do that? If so, how do I get to the column Font? Thanks in advance for any ideas and/or suggestions!
One possible solution:
this.ultraGrid.BeforeSelectChange += new BeforeSelectChangeEventHandler(ultraGrid_BeforeSelectChange);
void ultraGrid_BeforeSelectChange(object sender, BeforeSelectChangeEventArgs e){ UltraGrid grid = sender as UltraGrid;
if ( e.Type == typeof(Infragistics.Win.UltraWinGrid.ColumnHeader) ) { if ( grid.Selected.Columns.Count == 1 ) grid.Selected.Columns[0].Appearance.Reset();
if ( e.NewSelections.Columns.Count == 1 ) { e.NewSelections.Columns[0].Column.Header.Appearance.FontData.Bold = DefaultableBoolean.True; e.NewSelections.Columns[0].Column.Header.Appearance.ForeColor = Color.Red; } }}
Hello Brian,
When I tried to use your sample code, it was not fired when I clicked the column headers, only when I clicked in the grid data area. In the latter case, it will never be a column header. When I clicked the column header, it sorted, as I would have expected.