Hello
I have looked through the forums and I haven't found an answer that works yet so I thought I would just ask. I am trying to make the first row of my radgridview object have a blue background color in c#. This is some of the code
foreach (var ResultLine in myFiles)
{
string[] Contents = System.IO.File.ReadAllLines(ResultLine.FullName.ToString());
if (headercount == 0)
{
string HeaderRow = Contents[0];
string[] HeaderRowSplit = HeaderRow.Split(new char[] { ',' });
for (int i = 0; i < rgvAlarmLog.ColumnCount; i++)
{
rgvAlarmLog.Rows[rowCount].Cells[i].Value = HeaderRowSplit[i];
rgvAlarmLog.Rows[rowCount].Cells[i].Style.BackColor = System.Drawing.Color.Blue;
}
rowCount++;
headercount = 1;
If I change backcolor1 or 2 or 3 then I see color change in the highlighted row when selected. I do not want that though. I want the background color to be blue all the time. How can I do this with code?
I have looked through the forums and I haven't found an answer that works yet so I thought I would just ask. I am trying to make the first row of my radgridview object have a blue background color in c#. This is some of the code
foreach (var ResultLine in myFiles)
{
string[] Contents = System.IO.File.ReadAllLines(ResultLine.FullName.ToString());
if (headercount == 0)
{
string HeaderRow = Contents[0];
string[] HeaderRowSplit = HeaderRow.Split(new char[] { ',' });
for (int i = 0; i < rgvAlarmLog.ColumnCount; i++)
{
rgvAlarmLog.Rows[rowCount].Cells[i].Value = HeaderRowSplit[i];
rgvAlarmLog.Rows[rowCount].Cells[i].Style.BackColor = System.Drawing.Color.Blue;
}
rowCount++;
headercount = 1;
If I change backcolor1 or 2 or 3 then I see color change in the highlighted row when selected. I do not want that though. I want the background color to be blue all the time. How can I do this with code?