在我的母版页(_Layout.cshtml)中,我有用户菜单控件,例如:-
HTML:
<div id="menucontainer">
<li class="adminPanel"><a class = "FacilityUpdate" href="#">Rename Facility Test</a></li>
</div>
<div id="dialog" title="Rename Facility">
<div id="grid" style="overflow: auto; overflow-y: hidden; -ms-overflow-y: hidden;
white-space: nowrap;">
@Html.Action("GridViewPartial") @*This creating problem*@
</div>
</div>
查询:
$('.FacilityUpdate').click(function (event) {
$('#dialog').dialog('open');
event.preventDefault();
});
GridviewPartial :这个局部视图出现在布局视图中
@{
var grid = Html.DevExpress().GridView(settings =>
{
settings.Name = "GridView";
settings.CallbackRouteValues = new { Controller = "controllername", Action = "GridViewPartial" };
settings.KeyFieldName = "lng_id";
settings.SettingsPager.Visible = true;
settings.Settings.ShowGroupPanel = false;
settings.Settings.ShowFilterRow = false;
settings.SettingsBehavior.AllowSelectByRowClick = true;
settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
settings.SettingsCookies.Enabled = true;
settings.Columns.Add(column =>
{
column.FieldName = "s_str_pstrname";
column.Caption = "Source Facility";
column.Width = System.Web.UI.WebControls.Unit.Percentage(8);
});
});
}
@grid.Bind(Model).GetHtml()
问题 :
当我在默认视图上时,即。Layout.cshtml 然后弹出窗口将打开带有数据的 devexpress 网格。但是当我移动到另一个视图并单击 Menuitem 时,devexpress 网格会创建此错误:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 24 Oct 2013 07:55:53 UTC
Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
URI: http://localhost:4640/PlatAnodeSurvey
我如何创建一个全局弹出窗口,以便我单击任何视图,然后单击 menuitem 弹出窗口将打开绑定网格。这里 Devexpress 网格是我的限制,因为我在整个项目中都使用 devexpress。
提前致谢。