How to Change Cell Backcolor if Datagridview2.item.value = Datagridview1.item.value [modified]
-
i want to make program like this: if DataGridView2.item(SID).value = DataGridView1.item(LID).value then color=green else color=red i want all item list in DataGridView2.item(SID).value will be checked. not only first cell i mean like this(see the picture): http://i43.tinypic.com/9posc2.jpg
modified on Thursday, February 26, 2009 8:24 AM
-
i want to make program like this: if DataGridView2.item(SID).value = DataGridView1.item(LID).value then color=green else color=red i want all item list in DataGridView2.item(SID).value will be checked. not only first cell i mean like this(see the picture): http://i43.tinypic.com/9posc2.jpg
modified on Thursday, February 26, 2009 8:24 AM
Colouring the background of a DataGridView-Cell works as following listed: Dim cs As DataGridViewCellStyle cs = New DataGridViewCellStyle cs.BackColor = Color.Green aDataGridView.Rows(r).Cells(c).Style = cs Note, that the above code overwrites existing CellStyles you already assigned to a cell (maybe via the GUI-Design-Tool and so on). For a complete row, you could use instead: aDataGridView.Rows(r).DefaultCellStyle.BackColor = Color.Green
modified on Thursday, February 26, 2009 7:45 AM
-
Colouring the background of a DataGridView-Cell works as following listed: Dim cs As DataGridViewCellStyle cs = New DataGridViewCellStyle cs.BackColor = Color.Green aDataGridView.Rows(r).Cells(c).Style = cs Note, that the above code overwrites existing CellStyles you already assigned to a cell (maybe via the GUI-Design-Tool and so on). For a complete row, you could use instead: aDataGridView.Rows(r).DefaultCellStyle.BackColor = Color.Green
modified on Thursday, February 26, 2009 7:45 AM
Seee picturee.... http://i43.tinypic.com/9posc2.jpg
If DataGridView2.Item("BLnumber2", e.RowIndex).Value = DataGridView1.Item("BLNumber1", e.RowIndex).Value Then
modified on Thursday, February 26, 2009 9:19 AM
-
Seee picturee.... http://i43.tinypic.com/9posc2.jpg
If DataGridView2.Item("BLnumber2", e.RowIndex).Value = DataGridView1.Item("BLNumber1", e.RowIndex).Value Then
modified on Thursday, February 26, 2009 9:19 AM
What exactly you need to know?
-
What exactly you need to know?
see the picture: http://i43.tinypic.com/9posc2.jpg