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
close icon

I want example of delete record with confirm box

Thanks for your previous reply.

Technology  must be angular and mvc

after selecting record from grid when  I click on delete button grid header 
I want to display confirmation dialog box to user 
With Ok and Cancel button 
and so when i click on Ok button i can delete the record
if i will click on Cancel button popup will close and record will not be deleted.
note   : just for your better understanding  we just want to display custom dialog box with Ok and Cancel

Waiting for you quick response 
Thank you 







1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team September 7, 2015 06:22 AM UTC

Hi Bharat,

Thanks for contacting Syncfusion support.

Please enable the showdeleteconfirmdialog API of editsettings, in order to show the custom dialog box while deleting the record.


Please refer to the UG Documentation for the showdeleteconfirmdialog API  from the following link:

http://docs.syncfusion.com/js/api/ejgrid#members:editsettings-showdeleteconfirmdialog

Please find the code example and sample,

<div ng-app="employeeView">

    <div ng-controller="GridCtrl">

        <div ej-grid id="Grid" e-width="500px" e-datasource="data" e-allowsorting="true" e-allowPaging="true" e-toolbarsettings-showtoolbar="true" e-toolbarsettings-toolbaritems="tools" e-editsettings-allowdeleting=' true' e-editsettings-allowediting='true' e-editsettings-showdeleteconfirmdialog=' true'>

            <div e-columns>

                <div e-column e-field="EmployeeID" e-headertext="Employee ID" e-isprimarykey="true" e-textalign="right"></div>

                <div e-column e-field="LastName" e-headertext="Last Name" e-textalign="right"></div>

                <div e-column e-field="FirstName" e-headertext="First Name" e-textalign="right"></div>

                <div e-column e-field="Title" e-headertext="Title" e-textalign="right"></div>

                <div e-column e-field="City" e-headertext="City" e-textalign="right"></div>

                <div e-column e-field="Country" e-headertext="Country" e-textalign="right"></div>

            </div>

        </div>

    </div>
</div>


Sample Link: http://www.syncfusion.com/downloads/support/forum/120147/ze/ServerOperations1436284695

Regards,
Prasanna Kumar N.S.V

Loader.
Live Chat Icon For mobile
Up arrow icon