Hi,
I am developing a DNN module using telerik ajax controls. I am trying to open a radwindow in a radgrid editform template;
Settings: dotnetnuke 7 + christoc module, telerik ajax ui conrols: 2014 Q2 release 2. I have registered a usercontrol Patientupdate.ascx in DNN. Inside it I have several controls i.e. a radgrid (ResultaatGrid) and a radwindow, also as a user control (but not registered in DNN) named COVUserControl. The radwindow is called inside a radgrid in formedit mode when a button is click.
a snippet of the code for the radwindow(inside the patientupdate.ascx)
In the radwindow I have put the usercontrol (COVUserControl) and inside the user control I have defined a radgrid.
<telerik:RadWindow ID="COVWindow" Title="Editing record" Width="270"
Height="540" VisibleOnPageLoad="false" Behaviors="Resize, Minimize, Close, Pin, Maximize, Move"
Left="610" EnableShadow="true" runat="server" OnClientClose="refreshGrid" Modal="true">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
<COVUC:COVUserControl runat="server" ID="COVUCID"/>
</asp:Panel>
</ContentTemplate>
</telerik:RadWindow>
In the edit template I have a button named <COV check> (in the patientupdate.ascx) and in the code behind of the patientupdate.ascx.cs
in the ResultaatGrid_Itemcommand I have the following code:
protected void ResultaatGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "COV")
{
GridEditableItem editedItem = e.Item as GridEditableItem;
string pCperID = editedItem.GetDataKeyValue("cpersoon_id").ToString();
COVWindow.Width = 500;
COVWindow.Height = 250;
COVUserControl COVUC1 = COVWindow.ContentContainer.FindControl("COVUCID") as COVUserControl;
COVUC1.cPersoonID = pCperID;
RadGrid COVGrid = COVUC1.FindControl("COVGrid") as RadGrid;
string script = "function f(){$find(\"" + COVWindow.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
COVGrid.Rebind();
}
}
The problem is that the radwindow does not pop-up. (I have check the pop-up in host -> extension-> and check allow pop-ups for the module).
When debugging (attach) I see Covgrid.rebind is fired because it fires the radgrid need datasource of the grid inside the COVUserControl.
I think that the following code lines does not fire:
string script = "function f(){$find(\"" + COVWindow.ClientID + "\").show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
Simalar code works (except the radscriptmanager which I cannot used it in DNN because DNN used it's own scriptmanager) , the radwindow pop-up, when NOT a dotnetnuke module. (if the code in patientupdate.ascx is moved to a plain aspx).
Please help, I need to solve this issue :-(
Thanks in advance,
Regards,
Henk
I am developing a DNN module using telerik ajax controls. I am trying to open a radwindow in a radgrid editform template;
Settings: dotnetnuke 7 + christoc module, telerik ajax ui conrols: 2014 Q2 release 2. I have registered a usercontrol Patientupdate.ascx in DNN. Inside it I have several controls i.e. a radgrid (ResultaatGrid) and a radwindow, also as a user control (but not registered in DNN) named COVUserControl. The radwindow is called inside a radgrid in formedit mode when a button is click.
a snippet of the code for the radwindow(inside the patientupdate.ascx)
In the radwindow I have put the usercontrol (COVUserControl) and inside the user control I have defined a radgrid.
<telerik:RadWindow ID="COVWindow" Title="Editing record" Width="270"
Height="540" VisibleOnPageLoad="false" Behaviors="Resize, Minimize, Close, Pin, Maximize, Move"
Left="610" EnableShadow="true" runat="server" OnClientClose="refreshGrid" Modal="true">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
<COVUC:COVUserControl runat="server" ID="COVUCID"/>
</asp:Panel>
</ContentTemplate>
</telerik:RadWindow>
In the edit template I have a button named <COV check> (in the patientupdate.ascx) and in the code behind of the patientupdate.ascx.cs
in the ResultaatGrid_Itemcommand I have the following code:
protected void ResultaatGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "COV")
{
GridEditableItem editedItem = e.Item as GridEditableItem;
string pCperID = editedItem.GetDataKeyValue("cpersoon_id").ToString();
COVWindow.Width = 500;
COVWindow.Height = 250;
COVUserControl COVUC1 = COVWindow.ContentContainer.FindControl("COVUCID") as COVUserControl;
COVUC1.cPersoonID = pCperID;
RadGrid COVGrid = COVUC1.FindControl("COVGrid") as RadGrid;
string script = "function f(){$find(\"" + COVWindow.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
COVGrid.Rebind();
}
}
The problem is that the radwindow does not pop-up. (I have check the pop-up in host -> extension-> and check allow pop-ups for the module).
When debugging (attach) I see Covgrid.rebind is fired because it fires the radgrid need datasource of the grid inside the COVUserControl.
I think that the following code lines does not fire:
string script = "function f(){$find(\"" + COVWindow.ClientID + "\").show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
Simalar code works (except the radscriptmanager which I cannot used it in DNN because DNN used it's own scriptmanager) , the radwindow pop-up, when NOT a dotnetnuke module. (if the code in patientupdate.ascx is moved to a plain aspx).
Please help, I need to solve this issue :-(
Thanks in advance,
Regards,
Henk