dotnetnuke モジュール開発は初めてです。
設定: dotnetnuke 7 + christoc モジュール、telerik ajax ui コントロール: Q2 リリース 2。DNN に usercontrol Patientupdate.ascx を登録しました。その内部には、いくつかのコントロール、つまり radgrid (ResultaatGrid) と radwindow があり、COVUserControl という名前のユーザー コントロール (ただし、DNN には登録されていません) としても使用されます。radwindow は、ボタンがクリックされると、radgrid 内で、formedit モードで呼び出されます。
radwindow のコードのスニペット (patientupdate.ascx 内)
radwindow にユーザー コントロール (COVUserControl) を配置し、ユーザー コントロール内に 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>
編集テンプレートには、(patientupdate.ascx 内に) という名前のボタンと、patientupdate.ascx.cs の背後にあるコードがあります。
ResultaatGrid_Itemcommand には、次のコードがあります。
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();
}
}
問題は、radwindow がポップアップしないことです。(ホスト -> 拡張機能 -> でポップアップを確認し、モジュールのポップアップを許可するを確認しました)。
デバッグ (アタッチ) すると、COVUserControl 内のグリッドの radgrid ニーズ データソースが起動されるため、Covgrid.rebind が起動されることがわかります。
dotnetnuke モジュールでない場合、同じコードが機能し、radwindow ポップアップが表示されます。(単純な患者の更新.aspx)。
次のコード行は起動しないと思います:
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);