how to change a row color in a data grid view in c# win application project?
-
:confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me
-
:confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me
Try the following code
dgView.Rows[1].DefaultCellStyle.BackColor = Color.Yellow; dgView.Rows[1].DefaultCellStyle.ForeColor = Color.Black;
Regards, -
:confused:hello i have a form in c#.net windows application. in this form a dataset and a table adapter is used.so is a grid. this form shows a grid that contains the records that are retrieved from a table in my database how can I change the color of a row in a grid ??????? plz help me