Setting the BackColor of indvidual cells in a DataGridView
- From: "Paul" <heythereto@xxxxxxxx>
- Date: 9 Feb 2007 12:32:24 -0800
Hello All,
I have been trying to figure out how to set the BackColor of
individual cells in a DataGridView. I found the following solution in
a VB usenet group
DataGridView1.Item(ColumnIndex, RowIndex).Style.BackColor = Color
DataGridView1.Item(ColumnIndex, RowIndex).Style.ForeColor = Color
or
DataGridView1.CurrentCell.Style.BackColor = Color
DataGridView1.CurrentCell.Style.ForeColor = Color
I figured I could just change the () to [] and it would work in C#.
Howver, the DataGridView does not seem to have an Item property. How
can I accomplish this using C#?
Thanks,
Paul
.
- Follow-Ups:
- Prev by Date: Re: Socket error
- Next by Date: Re: How can I wrap a collection ? (re-repost)
- Previous by thread: Re: Webapp Authentication best practice...
- Next by thread: Re: Setting the BackColor of indvidual cells in a DataGridView
- Index(es):