Highlight the background color
-
Hi, I am in framework 1.1 of vb.net. If I click a row, which is in the data grid, I want to change the entire row back ground color. How I can do?. tnx in adv.
Balasubramanian K.
-
Hi, I am in framework 1.1 of vb.net. If I click a row, which is in the data grid, I want to change the entire row back ground color. How I can do?. tnx in adv.
Balasubramanian K.
In the CurrentCellChanged event, get the CurrentRowIndex property of the DataGrid. Then, iterate every row; if the row index is equal to CurrentRowIndex, set the background colour to the colour you want. Otherwise (and this is important), reset the background colour to your default To set the background colour of a row, just set the DataGrid.SelectionBackColor property
-
In the CurrentCellChanged event, get the CurrentRowIndex property of the DataGrid. Then, iterate every row; if the row index is equal to CurrentRowIndex, set the background colour to the colour you want. Otherwise (and this is important), reset the background colour to your default To set the background colour of a row, just set the DataGrid.SelectionBackColor property
Yah. Thank you
Balasubramanian K.