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

Create button inline of Grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

146169 Jul 24,2019 12:40 AM UTC Jul 25,2019 09:15 AM UTC ASP.NET Core - EJ 2 4
loading
Tags: DataGrid
Peng Xie
Asked On July 24, 2019 12:40 AM UTC

I am using NetCore. I want to a grid that contains a button for responding click event. Here is my snippet. I couldn't add eventlistener on to this button.



Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On July 24, 2019 01:13 PM UTC

Hi Peng, 

Thanks for contacting Syncfusion support. 

we have validated your requirement. We suggest you to use custom command buttons to achieve your requirement. 
Please find the below documentation link for more information. 


Please get back to us, if you need further assistance. 


Regards, 

Seeni Sakthi Kumar S.

Peng Xie
Replied On July 24, 2019 06:04 PM UTC

First of all, document is helpful for solved creating CRUD button. But the way of getting data from that row is outdated. Would please give more updated example to me.


Peng Xie
Replied On July 24, 2019 06:11 PM UTC

More particularly, the cloest() method is not defined in you sample code

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On July 25, 2019 09:15 AM UTC

Hi Peng,  

Thanks for taking time to report the issue with the Help Document.  

Please follow the below code as of now. Use ‘ej.base.closes’ instead of ‘closest’.  

var onClick = function(args){ 
    var rowObj = grid.getRowObjectFromUID(ej.base.closest(args.target, '.e-row').getAttribute('data-uid')); 
    var data = rowObj.data; 
    alert(JSON.stringify(data)); 
} 

We have logged an UG improvement on the reported problem.  

Regards,  
Seeni Sakthi Kumar 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