1

我使用 mvc devexpress 我的问题是:当我通过 ajax 在模态弹出窗口中重新加载部分视图时,除部分视图之外的所有内容都删除

,我想要包含部分视图的弹出窗口,我可以通过单击(弹出窗口中的按钮)使用 ajax 刷新部分视图,并且在单击并刷新部分视图后弹出窗口保持打开状态,我只想在弹出窗口中刷新部分视图,并且弹出窗口保持打开状态:(

请帮助我这是我的代码

@Html.DevExpress().PopupControl(
                            settings =>
                            {
                                settings.Name = "GetDatepopUp";
                                settings.PopupElementID = "GetDate";
                                settings.PopupAction = PopupAction.LeftMouseClick;
                                settings.CloseAction = CloseAction.CloseButton;

                                settings.Modal = true;
                                settings.ShowShadow = true;
                                settings.ShowFooter = false;
                                settings.ShowHeader = true;
                                settings.PopupAnimationType = PopupAnimationType.Slide;
                                settings.Width = 50;
                                settings.Height = 50;
                                settings.AllowDragging = false;
                                settings.EnableAnimation = true;
                                settings.ShowLoadingPanel = true;
                                settings.ShowOnPageLoad = false;
                                settings.SetContent(() =>
                                {
                       @Html.RenderPartial("CalenderContainerPartialView", "Message");
                                });

                            }).GetHtml()

  ***************************************************************
  @using (
  Ajax.BeginForm(
   "CalenderContainerPartialView",
   new AjaxOptions 
    { HttpMethod = "Post", 
      UpdateTargetId = "PartialToRefresh",
      InsertionMode = InsertionMode.Replace 
    }
   ))
  { 
  @Html.TextBox("Name");
  @Html.DevExpress().Button(
                            settings =>
                            {
                                settings.Name = "chkfffff" ;
                                settings.Text = "test";
                                settings.UseSubmitBehavior = true;
                            }).GetHtml()
  }
 <br />
 <div id="PartialToRefresh">
   @{Html.RenderPartial("Calender");}
 </div>
4

2 回答 2

0

改变

@Html.RenderPartial("CalenderContainerPartialView", "Message");

Html.RenderPartial("CalenderContainerPartialView", "Message");

发现于: http: //www.devexpress.com/Support/Center/Question/Details/Q353474

于 2013-05-16T12:00:08.147 回答
0

为此,您可以使用内置的 PopupControl 回调。

看看这个演示。

于 2012-12-02T19:51:36.790 回答