Bill,
What about something like this?
Private Sub DataGridView1_C olumnHeaderMous eClick(ByVal sender As Object,
ByVal e As System.Windows. Forms.DataGridV iewCellMouseEve ntArgs) Handles
DataGridView1.C olumnHeaderMous eClick
If TypeOf Me.DataGridView 1.Columns(e.Col umnIndex) Is
DataGridViewChe ckBoxColumn Then
For Each row As DataRow In Me.DataGridView 1.Rows
CType(row.Item( e.ColumnIndex),
DataGridViewChe ckBoxCell).Valu e = True
Next
End If
End Sub
Hope this helps,
Steve
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>I can do this but how do I know which column contain the clumnheader being
clicked/selected?
Thanks again
Bill
"PlatinumBa y" <st*******@comm unity.nospamwro te in message
news:uF******** ******@TK2MSFTN GP02.phx.gbl...
>Bill,
Try handling the ColumnHeaderMou seClick of the DataGridView.
Hope this helps,
Steve
"Bill Nguyen" <bi************ *****@jaco.comw rote in message
news:OK******* *********@TK2MS FTNGP03.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