Dear Telerik Team,
I have a page with RadGrid control which has some bound columns and GridButton column which is for delete (having inner) item in grid. Open a popup when click on command item link button and it has a tabstrip which has three tabs. In third tab we have a grid which has to ask radconfirm on OnClient event when click on Generate command item Link button. If OK it has to fire event and do some operation. I tried with all the ways from the articles,forum and documentation source but i didn't. At last i tried with the below script which is working fine but i am unable to fire Delete in Grid.
<script language="javascript" type="text/javascript"> |
var oldConfirm = radconfirm; |
window.radconfirm = function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) |
{ |
var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually |
//Cancel the event |
ev.cancelBubble = true; |
ev.returnValue = false; |
if (ev.stopPropagation) ev.stopPropagation(); |
if (ev.preventDefault) ev.preventDefault(); |
//Determine who is the caller |
var callerObj = ev.srcElement ? ev.srcElement : ev.target; |
//Call the original radconfirm and pass it all necessary parameters |
if (callerObj) |
{ |
//Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again. |
var callBackFn = function (arg) |
{ |
if (arg) |
{ |
callerObj["onclick"] = ""; |
if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz |
else if (callerObj.tagName == "A") //We assume it is a link button! |
{ |
try |
{ |
eval(callerObj.href) |
} |
catch(e){} |
} |
} |
} |
oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); |
} |
return false; |
} |
</script> |