944,038 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 19580
  • VB.NET RSS
Oct 19th, 2007
0

Checkbox Value in DataGridView

Expand Post »
I need to update a cell with the Value from another cell
when a checkbox in the grid is checked but i need it to
update on clicking the checkbox


The only way i have is to do it on CellEndEdit but this requires the user to change cell first

My Code:
Private Sub dgData_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgData.CellEndEdit
' MsgBox(dgData.Rows(e.RowIndex).Cells(e.ColumnIndex).Value)
If dgData.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = "True" Then
dgData.Rows(e.RowIndex).Cells("DespQty").Value = dgData.Rows(e.RowIndex).Cells("Stock").Value
Else
dgData.Rows(e.RowIndex).Cells("DespQty").Value = 0
End If
End Sub
Similar Threads
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Mysql help
Next Thread in VB.NET Forum Timeline: Screen Grab a Hidden Fom





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC