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

Approve Reject Button within Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

144865 May 27,2019 04:51 AM UTC May 30,2019 12:53 PM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
Muhamad Adam Fakhrullah Nik Mohamad
Asked On May 27, 2019 04:51 AM UTC

Hi, can I know how to put approve and reject button inside grid? after approve,the record will remain in database and after reject, the record will deleted in database..Sorry for inconvenience.. I already throughout many article but I didnt found it. Thank you

Hariharan J V [Syncfusion]
Replied On May 30, 2019 12:53 PM UTC

Hi Muhamad Adam, 

Greetings from the Syncfusion support, 

We have analyzed your query and you can achieve your requirement using “command column” feature. We have created a sample with bind the Approve/Reject buttons within grid. You can achieve to save the change in database using the Approve button and revert the changes of edited values or edit form using Reject button.  Please refer the below code example, sample and Help Documentation for more information. 
 
[index.cshtml] 

@{ 
    List<object> commands = new List<object>(); 
    commands.Add(new { type = "Edit" , buttonOption = new {content="Edit" } }); 
    commands.Add(new { type = "Delete", buttonOption = new {content="Delete" } }); 
    commands.Add(new { type = "Save", buttonOption = new { content="Aprrove"} }); 
    commands.Add(new { type = "Cancel", buttonOption = new { content="Reject"} }); 
} 
<h2>EJ2 Grid</h2> 
 
<div> 
    <ejs-grid id="Grid" dataSource="ViewBag.DataSource" allowResizing="true" allowSorting="true" allowExcelExport="true" toolbarClick="toolbarclick" allowPaging="true" toolbar="@(new List<string>() { "ExcelExport" })"> 
        <e-grid-editSettings allowAdding="true" allowEditing="true" allowDeleting="true"></e-grid-editSettings> 
 
        <e-grid-columns> 
            .    .    .   
            <e-grid-column headerText="Manage Records" width="200" commands="commands"></e-grid-column> 
        </e-grid-columns> 
    </ejs-grid> 
</div> 




Regards, 
Hariharan 


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