How to register rapid clicks?

When I click rapidly on an sfdatagrid using the cellclick event It doesn't register every click. Lets say I had a label which counted the clicks it would only show 5 out of 10 clicks if I clicked rapidly. I'm assuming this is because it registers 2 clicks in quick succession as a double click instead of 2 single clicks. How can I change this so it registers every click?

Thanks


3 Replies

SP Sreemon Premkumar Muthukrishnan Syncfusion Team August 9, 2024 03:39 PM UTC

Hi ollie,

By default, the SfDataGrid provides both CellClick and CellDoubleClick events, which are triggered based on the click count. If the click count is one, the CellClick event is raised; if the click count is two, the CellDoubleClick event is raised. Currently, there is no option to change this behavior.

We have also reviewed the WinForms DataGridView control, which functions in the same manner. In response to your concern, we have initiated a discussion to explore any possible ways to modify this behavior in the DataGridView control. We will provide further updates if we receive any positive information. Please find the discussion link below.

Link:Query regarding the WinForms DataGridView CellClick and CellDoubleClick event · dotnet/winforms · Discussion #11849 (github.com)

Regards,

Sreemon Premkumar M.



OL ollie August 10, 2024 03:59 AM UTC

Thanks.

Could be done using mouse button messages through wndproc and hit testing them.

Or I could just run the logic on both the single and double click events




SP Sreemon Premkumar Muthukrishnan Syncfusion Team August 12, 2024 02:07 PM UTC

Hi ollie,

You can modify the WndProc function to manage mouse click events according to your logic.

Regards,
Sreemon Premkumar M.


Loader.
Up arrow icon