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

Add Button to a grid cell

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

1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team September 18, 2017 07:23 AM UTC

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. 


Loader.
Up arrow icon