How to discard mouse click in TDBGrid->OnColumnMoved

Hi All,

In a TDBGrid->OnColumnMoved event handler, I adjust some column sorting data mode.
First mode : If user click the title header, the sorting mode is switched to mode sort by one column only.
Second mode : If user drag the header, the sorting mode is switched to mode sort by multiple columns.
So, I also use the grid's OnTitleClicked event to handling the first mode.

Unfortunately, after the user drags a column and OnColumnMoved is finished, the VCL calls OnTitleClicked. This means my first sort mode appears after column dragging.

Is there a way in OnColumnMoved I can clear the mouse event queue so that OnTitleClicked doesn't get called?
Please help me solving this complex bug.

Thanks before.
Regards,
Andromeda.
Topic archived. No new replies allowed.