enable confirm dialog box when clicked on delete button in the grid

Hello,

I am trying to delete a record from the grid. When clicked on the delete icon, a confirm dialog box must appear before deletion. 
I tried to use the 'showDeleteConfirmDialog : true' attribute of the editSettings of the syncfusion ej-grid.  
But it did not work. I was trying with the example in plunker. 
Could please tell me how it needs to be implemented ?

let grid: Grid = new Grid(
        {
            dataSource: orderData,
            editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, showDeleteConfirmDialog: true},
            allowPaging: true,
            pageSettings: {pageCount: 5},
               columns: [
                {
                    field: 'OrderID', isPrimaryKey: true, headerText: 'Order ID', textAlign: 'right',
                    validationRules: { required: true }, width: 120
                },
                {
                    field: 'CustomerID', headerText: 'Customer ID',
                    validationRules: { required: true }, width: 140
                },
                {
                    field: 'Freight', headerText: 'Freight', textAlign: 'right', editType: 'numericedit',
                    width: 120, format: 'C2', validationRules: { required: true }
                },
                { field: 'ShipName', headerText: 'Ship Name', width: 170 },
                {
                    field: 'ShipCountry', headerText: 'Ship Country', editType: 'dropdownedit', width: 150,
                    edit: { params: { popupHeight: '300px' } }
                },
                { headerText: 'Manage Records', width: 160,
                    commands: [{ type: 'edit', buttonOption: { iconCss: ' e-icons e-edit', cssClass: 'e-flat' } },
                        { type: 'delete', buttonOption: { iconCss: 'e-icons e-delete', cssClass: 'e-flat' } },
                        { type: 'save', buttonOption: { iconCss: 'e-icons e-update', cssClass: 'e-flat' } },
                        { type: 'cancel', buttonOption: { iconCss: 'e-icons e-cancel-icon', cssClass: 'e-flat' } }]
                }
            ]
        });

1 Reply

PS Pavithra Subramaniyam Syncfusion Team January 24, 2018 12:40 PM UTC

Hi Ananya, 

We have Checked you query and we have confirmed  “ShowConfirmDialog is not showing in Command Column” as a defect and logged a report for the same. The Fix will be available in our  next patch release. 

Regards, 
Pavithra S. 


Loader.
Up arrow icon