Here is my javascript:
and my code behind:
If I do not pass it any parameters ( take out string.format) it works. If I try to pass it a parameter, it does not, it says this error:
Unhandled exception at line 17467, column 1
0x800a138f - JavaScript runtime error: Unable to get property 'open' of undefined or null reference
All I want to do is have a button on my grid that when I click it, it opens a radwindow with a parameter. If I have to do this another way, I am up for that.
<script type="text/javascript"> function ShowWindow(dealid) { var oWnd = window.radopen('Windows/DealReassignmentPopup.aspx', 'window1'); }</script>and my code behind:
protected void gridAssignSingleDeal_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (e.CommandName == "OpenWindow") { int datakeyvalue = Helper.IntHelper((e.Item as GridDataItem).GetDataKeyValue("ID")); string script = string.Format("<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowWindow({0}));</script>",datakeyvalue); ClientScript.RegisterStartupScript(this.GetType(), "showWindow", script); } }If I do not pass it any parameters ( take out string.format) it works. If I try to pass it a parameter, it does not, it says this error:
Unhandled exception at line 17467, column 1
0x800a138f - JavaScript runtime error: Unable to get property 'open' of undefined or null reference
All I want to do is have a button on my grid that when I click it, it opens a radwindow with a parameter. If I have to do this another way, I am up for that.