Recent

Author Topic: DBGrid OnCellClick event  (Read 4589 times)

luca

  • Jr. Member
  • **
  • Posts: 86
DBGrid OnCellClick event
« on: November 12, 2014, 09:50:47 pm »
I wrote a procedure for the OnCellClick Event.
This event is raised also when you click on row header.
In this case Column is nil.
Is it the right behaviour?

If yes it's important to test if column is nil before accessing its properties.

Regards
Luca



jesusr

  • Sr. Member
  • ****
  • Posts: 496
Re: DBGrid OnCellClick event
« Reply #1 on: November 14, 2014, 12:33:57 am »
Indeed it this event doesn't look very helpful, for header clicking there is the OnTitleClick event, I will remove it.

rvk

  • Hero Member
  • *****
  • Posts: 6704
Re: DBGrid OnCellClick event
« Reply #2 on: December 17, 2014, 12:12:47 pm »
Just to clarify... I think what was meant here was the click on the indicator of a row (row-indicator). The title-click already works correctly. In Delphi, when you click the row-indicator, no event is triggered. In Lazarus (trunk) the OnCellClick is triggered with an unassigned Column. Is this a bug or a conscious decision to deviate from Delphi-behavior? Should a bug-report be opened for this?

(tested with trunk: Lazarus 1.3 r47211 FPC 2.7.1 i386-win32-win32/win64)

 

TinyPortal © 2005-2018