I want to redirect to another page on double click of row in lightning-datatable, i have tried to add double click listener to lightning-datatable but it does not work. Could you please provide any idea or sample code for this.
Thanks!
There's no way to add extra handlers to a Lightning component that doesn't support them. The standard LWC way of doing something would be to add an actions
column (or a button
column if you only need one button), and then handle the rowaction event to perform the requested action. Examples are included in the documentation.
You cannot achieve this with standard data types. However you can create a new data type by using custom LWC component and add double click behaviour in it. You can refer to How to use custom LWC lightning component in lightning-datatable for a simple example.