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.
Syncfusion Feedback

NavigatorBar Delete Button command

Thread ID:

Created:

Updated:

Platform:

Replies:

103689 May 24,2012 01:22 PM UTC Jun 4,2012 06:29 AM UTC ASP.NET Web Forms (Classic) 4
loading
Tags: GridGroupingControl
Fabio
Asked On May 24, 2012 01:22 PM UTC

How i can customize the delete message alert pop up when I click on the delete button? I need to change the "Delete record?" message to an another one.

Thanks

Sridhar N [Syncfusion]
Replied On May 28, 2012 05:54 AM UTC

Hi Fabio,

Thanks for your interest in Syncfusion products.

Your requirement to customize the Delete confirmation message can be achieved by setting the customized text to confirmDeleteMessage in grid object. Please refer the below code snippets.

[Script]

$(document).ready(function () {

var gridId = '<%=this.GridGroupingControl1.ClientID%>';

var gridTable;

gridTable = GetEGridTable($get(gridId));

var gridObj = gridTable.GetGridObj();

gridObj.confirmDeleteMessage = " Delete current record?";

});

 

For your convenience, we have created sample and the same can be downloaded from the following link.

http://www.syncfusion.com/downloads/Support/DirectTrac/91188/ButtonBar Delete-2064488978.zip

Please let me know if you have any other questions or concerns.

Regards,

Sridhar.N


Fabio
Replied On May 30, 2012 07:58 AM UTC

Thanks for the response. Now i set my custom delete message but why when i click on the delete button the DataSourceControlRowDeleting event is not fired? I have no problem with the editing event which is raised when i click on the Edit button Command. If i put the delete command directly on any single row in the grid the DataSourceControlRowDeleting event is raised.

Thanks in advice




Fabio
Replied On May 30, 2012 08:47 AM UTC

I have also an another question. Trying your example it works only if i don't use  grid paging. If i use it when i change the default message "Delete record" is used because the document.ready function is not called on page change. How i can solve it?

I solved for the DataSourceControlRowDeleting. The RecordDeleting is call on delete.

Thanks


Sridhar N [Syncfusion]
Replied On June 4, 2012 06:29 AM UTC

Hi Fabio,

Thanks for your update.

We suspect that you are using UpdatePanel and so we suggest you to bind the DeleteConfirmationMessage on EndRequest. Please refer the below code snippet.

 

[Script]

$(document).ready(function () {

setConfirmationMessage();

});

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);

function EndRequest(sender, args) {

setConfirmationMessage();

}

function setConfirmationMessage() {

var gridId = '<%=this.GridGroupingControl1.ClientID%>';

var gridTable;

gridTable = GetEGridTable($get(gridId));

var gridObj = gridTable.GetGridObj();

gridObj.confirmDeleteMessage = " Delete current record?";

}

 

 

For your convenience, we have created sample and the same can be downloaded from the following link.

 

http://www.syncfusion.com/downloads/Support/DirectTrac/95077/ButtonBar Delete1638186371.zip

 

Please let me know if you have any other questions or concerns.

 

Regards,

Sridhar.N


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.

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

;