Re: datagrid checkbox
From: Agnes (agnes_at_dynamictech.com.hk)
Date: 10/07/04
- Next message: Tom Shelton: "Re: Simple Math function"
- Previous message: Tom Shelton: "Re: szPname As String * MAXPNAMELEN (How to declare)"
- In reply to: Frank: "datagrid checkbox"
- Next in thread: Cor Ligthert: "OT"
- Reply: Cor Ligthert: "OT"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 7 Oct 2004 16:06:04 +0800
This is my first post [which answer someone 's question, heeeheee] ** I will
check whether the user click the checkbox on the 3rd column or not .
Try the following code
Private Sub dgUser_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles dgUser.MouseUp
Dim hti As DataGrid.HitTestInfo = Me.dgUser.HitTest(e.X,
e.Y)
If hti.Type = DataGrid.HitTestType.Cell AndAlso (hti.Column
= 2) Then
Me.dgUserBranchForm(hti.Row, hti.Column) = Not
CBool(Me.dgUserBranchForm(hti.Row, hti.Column))
end if
end sub
"Frank" <frank@frank.com> ¦b¶l¥ó news:ck2prl$9f6$1@news1.zwoll1.ov.home.nl
¤¤¼¶¼g...
> Hello,
> I have a forms datagrid with booleanboxes in it. Works fine excepts for
the
> fact that I have to click twice to set/reset the checkmark.
> First click the cell is selected and on the second click the checkmark is
> (un)checked.
> Is there a way to just click once to (un)check?
> Thanks
> Frank
>
>
- Next message: Tom Shelton: "Re: Simple Math function"
- Previous message: Tom Shelton: "Re: szPname As String * MAXPNAMELEN (How to declare)"
- In reply to: Frank: "datagrid checkbox"
- Next in thread: Cor Ligthert: "OT"
- Reply: Cor Ligthert: "OT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|