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.
Unfortunately, activation email could not send to your email. Please try again.

Add Button to a grid cell

Thread ID:

Created:

Updated:

Platform:

Replies:

132712 Sep 17,2017 10:06 AM Sep 18,2017 03:23 AM ASP.NET Core 1
loading
Tags: Grid
Edmund Herbert
Asked On September 17, 2017 10:06 AM

Hi Guys how could I add a button to Asp.Net Core 2.0 Grid row and have an on click event fire when button is clicked

I could not find any reference to be able to do this

I would like a button on Grid Row that would fire event when clicked

Thanks in advance

Edmund Herbert

Venkatesh Ayothi Raman [Syncfusion]
Replied On September 18, 2017 03:23 AM

Hi Edmund, 

Thanks for contacting Syncfusion support. 



We have built-in support of custom command column feature in Grid. In this feature, we can render the button in Grid and define the click function for that. Please refer to the following code example and Help documentation for more information, 
Code example
[Grid] 
 
<ej-grid id="FlatGrid" allow-paging="true" datasource="ViewBag.DataSource"> 
    <e-edit-settings allow-deleting="true" /> 
    <e-columns> 
        . . . 
        <e-column header-text="custom command" > 
            <e-column-commands > 
                <e-column-command type="Details"> 
 
                <e-button-options click="customButton" text="Details"></e-button-options> 
                </e-column-command> 
 
            </e-column-commands> 
        </e-column> 
    </e-columns> 
</ej-grid> 
 
<script type="text/javascript">  
[button click function] 
    function customButton(e) {  
 
      //do stuff 
    } 
</script> 

 
We have also prepared a sample for your convenience which can be download from following link, 


And we have also command column feature in Grid which can be performed CRUD operation in Grid. Please refer to the following Help documentation for more information, 
 
If we misunderstood your requirement, then could you please provide more details of it. 


Regards, 
Venkatesh Ayothiraman. 


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.

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.

;