This is a migrated thread and some comments may be shown as answers.

GridButtonColumn with RadConfirm

3 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manuel Ortiz
Top achievements
Rank 1
Manuel Ortiz asked on 06 May 2010, 06:46 AM
Hi, I would like to include a GridButtonColumn in my grid which, when clicked, it would reset some fields of my database from code behind.  However, I would like to show the user a RadConfirm window such as the one that appears when you press the delete icon in the delete button column, that asks the user if he/she is sure that he wants to execute such reset.  If the user answers "no" or "cancel" then the code behind would not be executed.

Is there anyway I can do this or any tutorial or code library that I can use to accomplish this??

Thanks in advance,
Manuel

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 May 2010, 08:30 AM

Hello Manuel,

You can easily achieve this by setting the ConfirmText property of GridButtonColumn. Also set the ConfirmDialogType to "RadWindow".

aspx:

 
<telerik:GridButtonColumn Text="Reset" CommandName="Reset" ConfirmText="Are you sure...?" ConfirmDialogType="RadWindow">  
</telerik:GridButtonColumn> 

[Important: Make sure that RadWindowManager is placed on page.]

-Shinu.

0
Kiran
Top achievements
Rank 1
answered on 07 Apr 2020, 04:40 PM

Perfect! I have a small question though? How do I pass a Parameter when using this approach? For example: If I want to specify the record ID or something like, "Are you sure to delete ID: 3?".

Thank you.

0
Kiran
Top achievements
Rank 1
answered on 07 Apr 2020, 04:51 PM

I got it! Adding these two would help in achieving in specifying record information like ID, or order number and so on.

ConfirmTextFields="SID" ConfirmTextFormatString="Are you sure you want to delete SID: {0}?"

Tags
Grid
Asked by
Manuel Ortiz
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kiran
Top achievements
Rank 1
Share this question
or