![]() |
#1
|
|||
|
|||
![]()
I asked this before but never got a fully working answer
![]() How can I determine what column I click in a grid when I use rowselect ? |
#2
|
|||
|
|||
![]()
What are you using for a control, that has an OnRowSelect Event?
If this helps, please accept as answer! UnSysApps |
#3
|
|||
|
|||
![]()
a SMDBGrid, but for the purpose of the question, this behaves the same as a DBGrid.
So that when you click a cell it selects the entire row in the grid... |
#4
|
|||
|
|||
![]()
Right, my concern was whether or not there was a OnRowSelect event in your control, because there is not in a Standard TDBGrid. So, is there, if not, what events are there in that grid?
If this helps, please accept as answer! UnSysApps |
#5
|
|||
|
|||
![]()
Now I understand what you mean
![]() ![]() Again sorry if I sounded confusing! I just meant I use that option as for my problem it makes a world of difference.. |
#6
|
|||
|
|||
![]()
it looks like the OnCellClick event gives you the column
If this helps, please accept as answer! UnSysApps |
#7
|
|||
|
|||
![]()
Hey
Yes it does, IF you do NOT use rowselect ![]() Cause if you do cellclick doesn't register correctly... |
#8
|
|||
|
|||
![]()
Use the OnMouseDown (or OnMouseUp) event and convert the X/Y coordinates to cell corrdinates (row/column)
No other way. With best regards, Mike Shkolnik http://www.scalabium.com |
#9
|
|||
|
|||
![]()
easy...
i use in sometimes procedure TFasist.stggMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var ACol, ARow: Integer; begin stgg.MouseToCell(x, y, ACOl, ARow); if Arow <= stgg.Fixedrows-1 then begin // clicked on a fixed column..... end; end; note i recomend you download nextgrid: www.bergsoft.net no include code but is a powerfull is freeware too have a good forum: http://forum.bergsoft.net/ thanks accept if help you |
#10
|
|||
|
|||
![]()
That grid looks good, but only the nextgrid is free... the DB aware grid is payment only
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|