I should clarify, It's a windows forms app, visual studio 2002, populated in
the code below.
I don't know what the syntax is for setting the column color of a specific
column (for example, when i=2, I need to column color to be gray). I don't
think the property builder is available in this situation (is that just for
web apps?).
Thanks,
Dave
DataGridTableSt yle tableStyle = new DataGridTableSt yle();
tableStyle.Mapp ingName = "Defs";
DataTable dt = dsDefs.Tables["Defs"];
for(int i = 0; i < dt.Columns.Coun t; ++i)
{
DataGridTextBox Column TextCol = new DataGridTextBox Column();
TextCol.Mapping Name = dt.Columns[i].ColumnName;
TextCol.HeaderT ext = dt.Columns[i].ColumnName;
tableStyle.Grid ColumnStyles.Ad d(TextCol);
}
dataGrid1.Table Styles.Clear();
dataGrid1.Table Styles.Add(tabl eStyle);
dataGrid1.DataS ource = dt;
"Dave Petersen" <da************ *******@carlson .com> wrote in message
news:uX******** ******@TK2MSFTN GP12.phx.gbl...
How do I set the color of a specific column in my C# winforms datagrid?
Thanks,
Dave