I was trying to access the column number of a column clicked in a true db grid as I wanted to hide some control based on that.
How do I do that??
If i use gridname.col it gives me the column number of the first column.
Help!!!!
Printable View
I was trying to access the column number of a column clicked in a true db grid as I wanted to hide some control based on that.
How do I do that??
If i use gridname.col it gives me the column number of the first column.
Help!!!!
Hi,
Use the Click event use "HeadClick", that should fix your problem.
Hope this helps.
Danial
Code:
Private Sub DBGrid1_HeadClick(ByVal ColIndex As Integer)
Me.Caption = ColIndex
End Sub