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

GridEditCommandColumn Update ConfirmText missing

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dio
Top achievements
Rank 1
Dio asked on 25 Jul 2008, 01:37 PM
Hi Folks
Im trying to do one simle stuff, this is the scenario

When the User Click "Edit"
The Edit Windows appear

and there is 2 buttons

Update and Cancel!  , no problem  untill now!

When User Click Update, a simple Confirm Message should appear
Like
"Do you wanna really Update the info"?
Yes/No

How do i perform that,
There is no such Confirm Text GridEditCommandColumn , or even a ClientSide Event to Trigger this message!!?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Jul 2008, 05:11 AM
Hi Dio,

Try the following code snippet to achieve the desired scenario.

CS:
  protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode)) 
        { 
            GridEditableItem edititem = (GridEditableItem)e.Item; 
            LinkButton lnkbtn = (LinkButton)edititem.FindControl("UpdateButton"); 
            lnkbtn.Attributes.Add("OnClick", "javascript:return confirm('Do you wanna really Update the info?')"); 
 
        } 
    } 


Regards
Shinu.
Tags
Grid
Asked by
Dio
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or