泰勒里克。 RadWindow 上的 RadScriptManager 问题
我从父窗体显示 RadWindow:
<telerik:RadTreeView ID="tvFile" runat="server">
OnClientContextMenuItemClicking="onClientContextMenuItemClicking">
<ContextMenus>
<telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
<Items>
<telerik:RadMenuItem Value="Rights" Text="Rights"/>
</Items>
</telerik:RadTreeViewContextMenu>
</ContextMenus>
</telerik:RadTreeView>
<telerik:RadWindowManager ID="winManager" ShowContentDuringLoad="false" VisibleStatusbar="false"
ReloadOnShow="false" runat="server" Skin="Sunset" EnableShadow="true">
<Windows>
<telerik:RadWindow ID="RadWindow2" Modal="true" onClientClose="OnClientClose"
NavigateUrl="UserRights.aspx" runat="server" Behaviors="Close">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<script type="text/javascript">
function OnClientClose(oWnd, args)
{
var arg = args.get_argument();
if (arg)
{}
}
function openWin(path) {
var oWnd = radopen("UserRights.aspx?file="+path, "RadWindow2");
}
function onClientContextMenuItemClicking(sender, args)
{
var menuItem = args.get_menuItem();
var treeNode = args.get_node();
var nodeValue = treeNode.get_value();
menuItem.get_menu().hide();
switch (menuItem.get_value())
{
case "Rights":
openWin(nodeValue);
break;
}
}
在 UserRights.aspx 中,我需要 RadScriptManager 来处理 RadListBox,如下所示:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
<asp:Button runat="server" ID="ds" Text="fd" />
<telerik:RadListBox runat="server" ID="dcs"></telerik:RadListBox>
</form>
但是当 RadWindow 在我的 firebug 中打开时,我收到 js 错误:
this._form 为 null Type._registerScript("MicrosoftAjaxWeb...UI._UpdateProgress",Sys.UI.Control);
当我没有 RadScriptManager 时一切都可以。但我需要它来实现 RadListBox 和 UpdatePanel 功能。
i show RadWindow from parent form:
<telerik:RadTreeView ID="tvFile" runat="server">
OnClientContextMenuItemClicking="onClientContextMenuItemClicking">
<ContextMenus>
<telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
<Items>
<telerik:RadMenuItem Value="Rights" Text="Rights"/>
</Items>
</telerik:RadTreeViewContextMenu>
</ContextMenus>
</telerik:RadTreeView>
<telerik:RadWindowManager ID="winManager" ShowContentDuringLoad="false" VisibleStatusbar="false"
ReloadOnShow="false" runat="server" Skin="Sunset" EnableShadow="true">
<Windows>
<telerik:RadWindow ID="RadWindow2" Modal="true" onClientClose="OnClientClose"
NavigateUrl="UserRights.aspx" runat="server" Behaviors="Close">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<script type="text/javascript">
function OnClientClose(oWnd, args)
{
var arg = args.get_argument();
if (arg)
{}
}
function openWin(path) {
var oWnd = radopen("UserRights.aspx?file="+path, "RadWindow2");
}
function onClientContextMenuItemClicking(sender, args)
{
var menuItem = args.get_menuItem();
var treeNode = args.get_node();
var nodeValue = treeNode.get_value();
menuItem.get_menu().hide();
switch (menuItem.get_value())
{
case "Rights":
openWin(nodeValue);
break;
}
}
At UserRights.aspx I need RadScriptManager for RadListBox like this:
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
<asp:Button runat="server" ID="ds" Text="fd" />
<telerik:RadListBox runat="server" ID="dcs"></telerik:RadListBox>
</form>
But when RadWindow opens at my firebug I got js error:
this._form is null
Type._registerScript("MicrosoftAjaxWeb...UI._UpdateProgress",Sys.UI.Control);
When I haven't got RadScriptManager all is OK. But I need it for RadListBox and UpdatePanel features.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您不在 RadWindow 中而是在 IFRAME 中显示内容页面,是否会出现同样的问题?如果问题仅存在于 RadWindow,请设置 ShowContentDuringLoad=true。
Does the same problem occur if you show the content page not in a RadWindow, but in an IFRAME? If the problem exists only with RadWindow, set ShowContentDuringLoad=true.