I have a radgrid that is databound using an object data source.
The grid has a GridTemplateColumn with an asp:ImageButton in it. This button has a click-event that does some business logic and then is supposed to open a new window with some calculated result.
I've tried Page.ClientScript, RadScriptManager.RegisterStartupScript, and RadScriptManager.GetCurrent(this.Page).RegisterDataItem.
I even tried to create a new RadWindow via code-behind, but nothing happens.
The master-page exposes the RadWindowsManager via the WindowManager property. The code is run since I can set a break-point in the click event.
The grid has a GridTemplateColumn with an asp:ImageButton in it. This button has a click-event that does some business logic and then is supposed to open a new window with some calculated result.
I've tried Page.ClientScript, RadScriptManager.RegisterStartupScript, and RadScriptManager.GetCurrent(this.Page).RegisterDataItem.
I even tried to create a new RadWindow via code-behind, but nothing happens.
public
void
editLink_Click(
object
sender, EventArgs e)
{
string
script =
"alert('hello');"
;
//This does not work
RadScriptManager.RegisterStartupScript(
this
, GetType(),
"test"
, script,
true
);
//This does not work
RadScriptManager.GetCurrent(
this
.Page).RegisterDataItem(
this
,
"javascript:"
+ script);
//This does not work
RadWindow newWindow =
new
RadWindow();
newWindow.NavigateUrl =
"http://www.telerik.com"
;
newWindow.VisibleOnPageLoad =
true
;
((AlarmLogMaster)
this
.Page.Master).WindowManager.Windows.Add(newWindow);
}
The master-page exposes the RadWindowsManager via the WindowManager property. The code is run since I can set a break-point in the click event.