Hey community,
I am working with version 2010.3.1109.35 of the RadControls for ASP.NET AJAX. I have a requirement to make a confirmation dialog appear on a grideditcommandcolumn.
For our purposes, we are retooling the edit button to do a delete.
In my grids ItemDataBound event, I have the following:
For your convenience my SR class looks like this:
The popup confirm dialog is displayed, but the cursor returns from there (ie: my debugger doesn't see it) and my ItemCommand event is never triggered. It doesn't seem matter which button I push, OK and Cancel do the same thing.
Any ideas?
I am working with version 2010.3.1109.35 of the RadControls for ASP.NET AJAX. I have a requirement to make a confirmation dialog appear on a grideditcommandcolumn.
For our purposes, we are retooling the edit button to do a delete.
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="Add/Delete"
HeaderStyle-Font-Bold="true" ButtonType="PushButton" EditText="Delete" InsertText="Add" HeaderStyle-Width="130"/>In my grids ItemDataBound event, I have the following:
if ((e.Item is GridEditableItem) && (!e.Item.Edit)){ GridEditableItem _item = (GridEditableItem)e.Item; ((Button)_item.FindControl("EditButton")).Attributes.Add("onclick", SR.GetString(SR.Message_DeletePopup, "configuration"));}...For your convenience my SR class looks like this:
...public static string GetString(string strString, string param1) { return string.Format(strString, param1); }...public const string Message_DeletePopup = "javascript:return confirm('Are you sure you wish to delete this {0}?');";...The popup confirm dialog is displayed, but the cursor returns from there (ie: my debugger doesn't see it) and my ItemCommand event is never triggered. It doesn't seem matter which button I push, OK and Cancel do the same thing.
Any ideas?