Issue with autoload partial content to window (MVC)

  1. #1

    Issue with autoload partial content to window (MVC)

    Hello All,

    I am newbie in ext.net, however had small experience using ExtJS before. I am trying to create window that would be able to load content from partial views. The window itself I am creating using JS. Here is a simple example:

    javascript function to create window

     showDialog: function () {
        var config = {
          title: "Creating new tender - General description - Step 1/6",
          id: 'Window1',
          width: 700,
          height: 500,
          renderTo: Ext.getBody(),
          maximizable: true,
          minimizable: true,
          layout: 'fit',
          resizable: true,
          autoLoad: {
            url: "/Tender/StartTender",
            params: {
              containerId: "Window1"
            },
            showMask: true,
            noCache: true,
            maskMsg: "Loading page...",
            scripts: true
          }
        };
    
        var w = new Ext.Window(config);
        w.show();
        w.center();
    view example

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" ClientIDMode="Static" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <ext:Panel ID="Panel1" runat="server" Layout="Accordion" Border="false">
        <Items>
            <ext:Panel ID="Panel2" runat="server" Title="Item1" />
            <ext:Panel ID="Panel3" runat="server" Title="Item2" />
            <ext:Panel ID="Panel4" runat="server" Title="Item3" />
            <ext:Panel ID="Panel5" runat="server" Title="Item4" />
            <ext:Panel ID="Panel6" runat="server" Title="Item5" />
        </Items>
    </ext:Panel>
    controller example

    public ActionResult StartTender(string containerId)
            {
              CCX.Web.Common.PartialViewResult pr = new CCX.Web.Common.PartialViewResult(containerId);
              pr.RenderMode = RenderMode.AddTo;
              pr.SingleControl = true;
              pr.WrapByScriptTag = true;
    
              return pr;
            }

    The first time when I opended this window calling openDialog() function all wass fine. The view is correctly displayed. However when I closed the window and tryied to open it again, after some time whole content of the view was disappeared and I am not able to close the window.

    Do you have ideas what I did wrong?

    Thanks,
    Alexander
  2. #2
    In Ext.Net, default CloseAction="Hide" therefore set it to 'close'
    closeAction: 'close'
  3. #3
    Thanks Vladimir, it works for me. You can close this thread.

Similar Threads

  1. Replies: 22
    Last Post: May 04, 2012, 11:49 AM
  2. [CLOSED] Modal Partial view Window
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 19, 2011, 5:26 PM
  3. AutoLoad Window Issue
    By khadga in forum 1.x Help
    Replies: 2
    Last Post: Apr 21, 2011, 12:45 PM
  4. [CLOSED] MVC- How to display a Partial View from a window
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 08, 2011, 11:32 AM
  5. Tab content render issue
    By sz_146 in forum 1.x Help
    Replies: 0
    Last Post: Jan 12, 2009, 12:58 PM

Tags for this Thread

Posting Permissions