|
|
Title | Change the color of a DataGridControl's editing control in Visual Basic 2005 |
Description | This example shows how to change the color of a DataGridView control's editing control in Visual Basic 2005. |
Keywords | DataGridView, edit, edit cell, color, cell color, Visual Basic 2005, VB 2005 |
Categories | Controls, VB.NET |
|
|
In the control's EditingControlShowing event handler, set the editing control's CellStyle.BackColor and CellStyle.ForeColor properties.
|
|
Private Sub DataGridView1_EditingControlShowing(ByVal _
sender As Object, ByVal e As _
System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) _
Handles DataGridView1.EditingControlShowing
e.CellStyle.ForeColor = Color.Yellow
e.CellStyle.BackColor = Color.Red
End Sub
|
|
|
|
|
|