The header cell always shows a default grey color for the text. Using the designer, I can't change the interior foreColor values as well. It defaults to Window
Hi John,
Thanks you for your interested in Syncfusion products.
Query Column Header color |
You can set the header color in GridGroupingControl using
the QueryCellStyleInfo event. Here you can the set the color for header. Please
refer the following codes. Private Sub
gridGroupingControl1_QueryCellStyleInfo(ByVal
sender As Object,
ByVal e As GridTableCellStyleInfoEventArgs)
If e.TableCellIdentity.TableCellType = GridTableCellType.GroupCaptionCell Then e.Style.CellType="Static" e.Style.BackColor=Color.Blue e.Style.TextColor
= Color.White End If
If e.TableCellIdentity.TableCellType = GridTableCellType.ColumnHeaderCell Then e.Style.TextColor
= Color.White If e.TableCellIdentity.Column.MappingName="Col0" Then e.Style.CellType
= "Static" e.Style.BackColor
= Color.SteelBlue End If If e.TableCellIdentity.Column.MappingName = "Col1" Then e.Style.CellType
= "Static" e.Style.BackColor
= Color.Green
End If
End If End Sub
Please refer the following sample file also it will helps
to you. See thee below image of GGC out put |
Please let me know if you have further concerns.
Vinish.
Hi Ash,
Thanks for your update.
Query Mouse Over Color |
To
set the mouse over color, you can use the following events. Using this event
you can set the mouse over color on enter and leaving in cell. Use these
events CellMouseHoverEnter
And CellMouseHoverLeave.
Please refer the attached sample also it will helps to you to set the
color on mouse over in header. |
Query 2 Sorting icon in Static Cell |
You
can set the icon in Column header using the DrawCell event and
DrawCellDisplayText event. Please refer the below codes. void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs
e) { GridTableCellStyleInfo
style = e.Inner.Style as GridTableCellStyleInfo; if
(style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell
&& style.TableCellIdentity.Column.Name =="Concat"
) { // Draw Sort-Arrow Brush brush = null; Pen pen1 = null;
e.TableControl.Model.Options.GridVisualStylesDrawing.GetSortIconBrush(out brush, out
pen1); Rectangle rect = e.Inner.ClipBounds;
rect.Offset(e.Inner.ClipBounds.Width - 20, 0);
rect.Width = 20; int i2 = Math.Max(0,
(rect.Height - 3) / 2);
rect.Inflate(-10, -10); ListSortDirection listSortDirection = ListSortDirection.Ascending; GridTriangleDirection triangleDirection =
listSortDirection == ListSortDirection.Ascending
? GridTriangleDirection.Up : GridTriangleDirection.Down; GridPaintTriangle.Paint(e.Inner.Graphics, rect,
triangleDirection, brush, pen1, true);
pen1.Dispose();
brush.Dispose(); } } Please refer the sample file also. It will helps to you to
modify your sample. http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC_Sort2094051458.zip And
also refer the following UG Link it will helps to you to more details about
drawCell and draw icon. |
Please let me know if you have further concerns.
Regards,
Vinish.
Hi Gaukhar Massabayeva,
Thank you for your interested in Syncfusion products.
As per request we have modified the sample to C#. Please find the attached sample with this forum. You can set the mouse over color on enter and leaving in cell. Use these events CellMouseHoverEnter And CellMouseHoverLeave to achieve the desired behavior.
Please let me know if you have further concerns.
Vinish.