I've got a datagrid with a checkbox column. Everything looks good.
I'd like to implement a chcekbox that when checked causes all the
checkboxes in the grid to become checked, and vice versa. Any ideas
on how to do this?
The following code does not work:
Dim iRow As Integer
Dim myView As DataView
myView = grdPersonSearchResults.DataSource
For iRow = 0 To myView.Table.Rows.Count - 1
If grdPersonSearchResults(iRow, 0) Then
grdPersonSearchResults(iRow, 0) = Me.chkCheckAll.Checked
End If
Next iRow
Where column 0 is the checkbox row.
Thanks,
Brian
|