Longpress event not fired in Datagrid

I tried to use your example for datagrid longpress event, bt it doesn't work. the event is not fired.


latest sf version on Windows 


https://github.com/SyncfusionExamples/How-to-delete-a-row-when-long-pressing-on-a-data-row-in-NET-MAUI-DataGrid-SfDataGrid/tree/859172


Edited: just doesnt work on windows. checked it on android emulator and it just works fine.



5 Replies 1 reply marked as answer

NY Nirmalkumar Yuvaraj Syncfusion Team March 19, 2024 02:38 PM UTC

Hi Tobias,

  

The DataGrid CellLongPress event will only be triggered by long-pressing on touch. We have attached a video sample for your reference. Please state your requirement where you are using this event


Regards,

Nirmalkumar


Attachment: SfDataGrid_longPress_a2f0af6f.zip


TH Tobias Horn replied to Nirmalkumar Yuvaraj March 19, 2024 03:00 PM UTC

I tried using it on Windows. Longpress of left mouse. on android it works like a charm. 


what i wanted to achieve:

my datagrid is editable. that means on double click, i start Editing the cell. now I also want to "check" a cell/mark as solved. therefore I implemented a Variable cell_completed for each cell separately. on longpress cell_completed of the pressed cell should switch between true/false. 

As i said longpress on android works, longpress on Windows not. 

if longpress is not implemented in Windows, is there any similar event, maybe right click? 



NY Nirmalkumar Yuvaraj Syncfusion Team March 20, 2024 11:56 AM UTC

Hi Tobias,

  

In the Windows platform, long-press actions can only be triggered by touch interaction rather than mouse pointer interaction. By default, the DataGrid supports the CellRightTapped event; however, this functionality is limited to Windows and Mac platforms. For further information on the CellRightTapped event, please refer to this UG link.


Regards,

Nirmalkumar



TH Tobias Horn March 20, 2024 12:02 PM UTC

Hi Nirmalkumar, 


Thanks for the clarification. 

that means on Windows, cellLongpress only works with a touch display attached? 

is there any way to mirror mouse pointer interaction to touch interaction? 


it should also be added in documentation, that longpress on Windows only works when a touch Display is attached. 


Best regards and thanks for your help, 

Toby 



NY Nirmalkumar Yuvaraj Syncfusion Team March 21, 2024 09:57 AM UTC

Hi Tobias,

  

As of now, DataGrid does not have support for invoking CellLongPressEvent using mouse interaction. We have already considered your request as a feature. We will implement this feature in any of our upcoming releases. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We appreciate your patience and understanding until then. You can follow up with the below feedback for further details, 


Feedback link: 51958


Regards,

Nirmalkumar


Marked as answer
Loader.
Up arrow icon