We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Current row data where the context menu is shown

I would like to implement actions based on the row data on the grid's context menu click.

How do I get the target row data

2 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team July 4, 2019 09:52 AM UTC

Hi Sahal, 

Greetings from Syncfusion support. 

You can get the rowData in the contextMenuClick event of Grid.   

Refer the below code example. 


<ejs-grid [dataSource]='data' id="gridcomp" (contextMenuClick)="contextMenuClick($event)" allowPaging='true' allowExcelExport='true' allowPdfExport='true' allowSorting='true' 
          [contextMenuItems]="contextMenuItems" [editSettings]='editing'> 

export class AppComponent { 
    contextMenuClick(args) { 
        console.log(args.rowInfo.rowData); // You can get the target row data in this argument. 

Refer the help documentation. 

Thavasianand S. 

KK Kumar, K Bharath September 28, 2022 10:04 AM UTC

args.rowInfo is coming as undefined. How to get that selected row data for edit ?

Live Chat Icon For mobile
Up arrow icon