GridButtonColumn with RadConfirm

4 posts, 0 answers
  1. Manuel Ortiz
    Manuel Ortiz avatar
    68 posts
    Member since:
    Aug 2009

    Posted 06 May 2010 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 May 2010 Link to this post

    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.

  3. Kiran
    Kiran  avatar
    57 posts
    Member since:
    Oct 2018

    Posted 07 Apr in reply to Shinu Link to this post

    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.

  4. Kiran
    Kiran  avatar
    57 posts
    Member since:
    Oct 2018

    Posted 07 Apr in reply to Kiran Link to this post

    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}?"

Back to Top