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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Current row data where the context menu is shown

Thread ID:

Created:

Updated:

Platform:

Replies:

145676 Jul 3,2019 09:20 AM UTC Jul 4,2019 09:52 AM UTC Angular - EJ 2 1
loading
Tags: Grid
Sahal
Asked On July 3, 2019 09:20 AM UTC

Hi,
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

Thavasianand Sankaranarayanan [Syncfusion]
Replied On 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. 

[app.component.html] 

<ejs-grid [dataSource]='data' id="gridcomp" (contextMenuClick)="contextMenuClick($event)" allowPaging='true' allowExcelExport='true' allowPdfExport='true' allowSorting='true' 
          [contextMenuItems]="contextMenuItems" [editSettings]='editing'> 
    <e-columns> 
         
         ----- 
 
    </e-columns> 
</ejs-grid> 
-------------------------------------------------------------------------------------------------------- 
[app.component.ts] 

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


Refer the help documentation. 


Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon