Header behavior on DBAdvGrid

Hello

I have a DBAdvGrid with sorting on click of the columns header.
I have assigned a function to the event OnCellClick of the DBAdvGrid.
When I click on the header to sort the columns the event OnCellClick of the DBAdvGrid is also executed.
¿How can I avoid this?
Thanks

Soledad

It is by design that this event is triggered, the cell is clicked, so it is triggered. Not sure why you want to disable this?

Because the cells and the header have different functions assigned to the Onclik event.

Click over the header of the DBAdvGrid sorts the columns and Click over a cell opens a second form.
I don´t want to open the form when I sort the columns.
Thanks

Hello.

Finally I have a solution with the following code:

if (ARow= 0) then
exit
else
begin

Thanks