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

how to set a RadConfirm when clicking on the cancel button of the popup edit template "the one the right corner of the popup"

2 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rasheed
Top achievements
Rank 1
Rasheed asked on 23 Jan 2012, 09:19 PM
hi 
i have a RadGrid, popup Edit template which has two buttons the insert/update and cancel button, clicking cancel button causes Rad Confirm to be displayed but there is another default cancel button at the right corner of the popup is there any way make this button views the same Rad Confirm or hide it, any help ?

thank you 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Jan 2012, 07:04 AM
Hello,

I am not quite sure about your scenario. I suppose you need to open a RadConfirm on cancel button click.

C#:
  protected void grid1_ItemCreated(object sender, GridItemEventArgs e)
   {
       if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
       {
           GridEditFormItem itm = (GridEditFormItem)e.Item;
           LinkButton btn = (LinkButton)itm.FindControl("CancelButton");
           btn.Attributes.Add("onclick", "test();return false;");
       }
    }
JS:
function test()
   {
     radconfirm("Your message");
   }

Hope it helps.

Thanks,
Princy.
0
Rasheed
Top achievements
Rank 1
answered on 24 Jan 2012, 04:18 PM
hello
thanks for your response
my solution was at this article


thank you
Tags
Grid
Asked by
Rasheed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rasheed
Top achievements
Rank 1
Share this question
or