tags:

views:

75

answers:

0

Hi,

I want to change the background colour of a row in a datagrid dynamically depending on some value in Form_Load function.

I am using c#.net windows application.

I am having the code..

for (int i = 0; i < 10; i++) { Datagrid1.Rows[1].Cells[i].Style.BackColor = Color.Khaki; }

Is there any other way of doing this without any loop. Since i have 500 rows which takes more time. Like

Something like

Datagrid1.rows[1].Color=Colour.Red;