Datagrid row colouring
-
I have a datagrid that is bound to a collection. I have events that fire on individual items in that collection. I would like to see an example with a form that has a datagrid, a button that says paint red and a textbox that specifies the index of the dg to paint
-
I have a datagrid that is bound to a collection. I have events that fire on individual items in that collection. I would like to see an example with a form that has a datagrid, a button that says paint red and a textbox that specifies the index of the dg to paint
I have the following inside one of my programs. where I have alternate colours for the datagrid rows. I donno if this would help, hope it does. if(i%2 == 0) { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightBlue; } else { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightSteelBlue; } Thomas
-
I have the following inside one of my programs. where I have alternate colours for the datagrid rows. I donno if this would help, hope it does. if(i%2 == 0) { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightBlue; } else { DataGrid1.Items[i].ForeColor = System.Drawing.Color.Black; DataGrid1.Items[i].BackColor = System.Drawing.Color.LightSteelBlue; } Thomas
i think that only works with a datagrid in in asp.net