Question : How to set  the forecolor a column in datagridview.vb.net 2005 windows

Hi,
How to set  the forecolor a single column created during runtime in datagridview white and the rest of the column forecolor to black.

Cheers

Answer : How to set  the forecolor a column in datagridview.vb.net 2005 windows

dataGridView.DefaultCellStyle.ForeColor = Color.Black;

DataGridViewColumn column = dataGridView.Columns[indexOfColumn];
DataGridViewCell cell = new DataGridViewTextBoxCell();

cell.Style.ForeColor = Color.White;
column.CellTemplate = cell;
Random Solutions  
 
programming4us programming4us