Bill,
What about something like this?
Private Sub DataGridView1_ColumnHeaderMouseClick(ByVal sender As Object,
ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArg s) Handles
DataGridView1.ColumnHeaderMouseClick
If TypeOf Me.DataGridView1.Columns(e.ColumnIndex) Is
DataGridViewCheckBoxColumn Then
For Each row As DataRow In Me.DataGridView1.Rows
CType(row.Item(e.ColumnIndex),
DataGridViewCheckBoxCell).Value = True
Next
End If
End Sub
Hope this helps,
Steve
"Bill Nguyen" <bi*****************@jaco.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I can do this but how do I know which column contain the clumnheader being
clicked/selected?
Thanks again
Bill
"PlatinumBay" <st*******@community.nospamwrote in message
news:uF**************@TK2MSFTNGP02.phx.gbl...
>Bill,
Try handling the ColumnHeaderMouseClick of the DataGridView.
Hope this helps,
Steve
"Bill Nguyen" <bi*****************@jaco.comwrote in message
news:OK****************@TK2MSFTNGP03.phx.gbl...
>>>I can't figure out how to identify/display the column header name in
Mouseclick event.
This is a checkbox column type and I would like all cells in this column
to toggle checked/unchecked when the user clicks on the column header.
YOur help is greatly appreciated.
Bill