double click

how to implement a custom function on double click in row of ejgrid

3 Replies

SE Sathyanarayanamoorthy Eswararao Syncfusion Team January 23, 2018 12:33 PM UTC

Hi Sunil, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and found that you need to  implement custom function when a row is double clicked. We have an inbuilt event for grid called recordDoubleClick which is triggered when a record is double clicked.  

Refer the following documentation for the details of recordDoubleClick event. 


Refer the following documentation for event binding in Angular. 


Regards, 
Sathyanarayanamoorthy 



SP Sunil patra February 5, 2018 07:09 AM UTC

working but when i double click on a row of a grid function get called and after that no where else(outside the grid) double click is working.
e.g. : there is grid with 4 rows and one button (button also works on double click).
when i double click in row-1 and then i try to double click that button(out side the grid) is not working, and if i double click on row-2 and then i click on that button ,the button works.
means there is a problem on double click event.
please help me to resolve this..


SE Sathyanarayanamoorthy Eswararao Syncfusion Team February 6, 2018 01:15 PM UTC

Hi Sunil, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we are unable to reproduce the mentioned issue. We have prepared a sample with the same requirement and the same can be found below. 



Please refer the code below. 

 
<table> 
  <tr> 
    <td >My First Button</td> 
    <td><input type="button" ej-button id="button" value="Button" (click)="click($event)" /></td> 
</tr> 
</table> 
 
   <ej-grid id="grdDBCon" [dataSource]="gridData" [editSettings]="editSettings" [toolbarSettings]="toolbarItems"  (recordDoubleClick)="Doubleclick($event)"> 
        <e-columns> 
           <e-column [isPrimaryKey]='true' field="OrderID" headerText="OrderID" width="30"></e-column> 
          
             ------------------------- 
 
        </e-columns> 
      </ej-grid> 
    </div> 
 
[component.ts] 
 
export class GridComponent { 
 
------------------------- 
 
    constructor() 
    { 
       //The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js' 
       this.gridData = window.gridData; 
 
                ----------------------------- 
 
    } 
 
    Doubleclick(e){ 
         console.log("asfasfa") 
    } 
 
    click(e){ 
        console.log(e.id) 
    } 
     
} 
 


Please provide the following details. 

  1. Have you performed any operations like filtering,sorting,etc before double clicking record.
  2. Code example of the grid.
  3. Share Syncfusion essential studio versions.
  4. If possible try to reproduce the mentioned issue in the attached sample.

The provided details will help us to provide the solution as soon as possible. 

Regards, 
Sathyanarayanamoorthy 



Loader.
Up arrow icon