Hi,
I got it . the code i used is :
Code:
Private Sub DataGridView1_CellValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
If Me.Visible = True Then
Dim ColumnIndex
ColumnIndex = DataGridView1.CurrentCell.ColumnIndex
If ColumnIndex = 2 Then
IndexValue = DataGridView1.CurrentRow.Cells(2).Value
DataGridView1.CurrentRow.Cells(3).Value = IndexValue
DataGridView1.CurrentRow.Cells(4).Value = IndexValue
End If
If ColumnIndex = 3 Then
IndexValue = DataGridView1.CurrentRow.Cells(3).Value
DataGridView1.CurrentRow.Cells(2).Value = IndexValue
DataGridView1.CurrentRow.Cells(4).Value = IndexValue
End If
If ColumnIndex = 4 Then
IndexValue = DataGridView1.CurrentRow.Cells(4).Value
DataGridView1.CurrentRow.Cells(2).Value = IndexValue
DataGridView1.CurrentRow.Cells(3).Value = IndexValue
End If
Else
Exit Sub
End If
End Sub
Private Sub DataGridView1_CurrentCellDirtyStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridView1.CurrentCellDirtyStateChanged
DataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit)
End Sub
How do i add the values of a particualr column in
VB.NET ( Visual studio 2008, .NET3.5)