[CLOSED] GridPanel in TabPanel - toolbar is missing

  1. #1

    [CLOSED] GridPanel in TabPanel - toolbar is missing

    Hello

    I migrated my code from Ext.Net 1.7 to 3.3 and noticed that when a gridpanel is placed into a tabpanel, the gridpanel's top toolbar is not displayed (so tools are not available to a user).

    Maybe there is a solution?

    I attach examples in Ext.Net 1.7 (old) and 3.3 (new):

    test_tabpanel_old.aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_tabpanel_old.aspx.cs" Inherits="test_tabpanel_old" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    test_tabpanel_old.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Web;
    using Ext.Net;
    
    public partial class test_tabpanel_old : System.Web.UI.Page
    {
    
      public class TestData
      {
        public static List<object> Data
        {
          get
          {
            return new List<object>
            {
              new {ID = 10},
              new {ID = 20},
              new {ID = 30}
            };
          }
        }
      }
    
      protected void Page_Load(object sender, EventArgs e)
      {
        ResourceManager res_man = new ResourceManager() { ID = "res_man" };
        res_man.IDMode = IDMode.Explicit;
        res_man.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
        res_man.DirectMethodNamespace = "net";
        form1.Controls.Add(res_man);
    
        Viewport viewport1 = new Viewport() { ID = "viewport1", Layout = "Border" };
    
        BorderLayout vp_layout1 = new BorderLayout();
        viewport1.Items.Add(vp_layout1);
    
        TabPanel tabpanel1 = new TabPanel() { ID = "tabpanel1", DeferredRender = false };
    
        vp_layout1.Center.Items.Add(tabpanel1);
    
        GridPanel grid1 = new GridPanel() { ID = "grid1", Title = "Grid1" };
        grid1.Tools.Add(new Tool() { Type = ToolType.Print });
            
        grid1.ColumnModel.Columns.Add(new Column() { DataIndex = "ID", Header = "ID" });
    
        Store store1 = new Store() { ID = "store1" };
        store1.Reader.Add(new JsonReader());
        store1.AddField(new RecordField("ID", RecordFieldType.Auto));
        
        grid1.Store.Add(store1);
    
        if (!X.IsAjaxRequest)
        {
          store1.DataSource = TestData.Data;
          store1.DataBind();
        }
    
        tabpanel1.Add(grid1);
    
        form1.Controls.Add(viewport1);
      }
    }

    test_tabpanel_new.aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test_tabpanel_new.aspx.cs" Inherits="test_tabpanel_new" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    test_tabpanel_new.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Web;
    using Ext.Net;
    
    public partial class test_tabpanel_new : System.Web.UI.Page
    {
    
      public class TestData
      {
        public static List<object> Data
        {
          get
          {
            return new List<object>
            {
              new {ID = 10},
              new {ID = 20},
              new {ID = 30}
            };
          }
        }
      }
    
      protected void Page_Load(object sender, EventArgs e)
      {
        ResourceManager res_man = new ResourceManager() { ID = "res_man" };
        res_man.IDMode = IDMode.Explicit;
        res_man.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
        res_man.DirectMethodNamespace = "net";
        form1.Controls.Add(res_man);
    
        Viewport viewport1 = new Viewport() { ID = "viewport1", Layout = "BorderLayout" };
    
        TabPanel tabpanel1 = new TabPanel() { ID = "tabpanel1", DeferredRender = false, Region = Region.Center };
        
        viewport1.Items.Add(tabpanel1);
    
        GridPanel grid1 = new GridPanel() { ID = "grid1", Title = "Grid1" };
        grid1.Tools.Add(new Tool() { Type = ToolType.Print });
    
        grid1.ColumnModel.Columns.Add(new Column() { DataIndex = "ID", Text = "ID" });
    
        Store store1 = new Store() { ID = "store1" };
    
        Model model1 = new Model();
        model1.Fields.Add(new ModelField("ID", ModelFieldType.Auto));
    
        store1.Model.Add(model1);
    
        grid1.Store.Add(store1);
    
        if (!X.IsAjaxRequest)
        {
          store1.DataSource = TestData.Data;
          store1.DataBind();
        }
    
        tabpanel1.Add(grid1);
    
        form1.Controls.Add(viewport1);
      }
    }
    Click image for larger version. 

Name:	tabpanel_old.jpg 
Views:	73 
Size:	32.6 KB 
ID:	24726Click image for larger version. 

Name:	tabpanel_new.jpg 
Views:	83 
Size:	31.2 KB 
ID:	24727
    Attached Thumbnails Click image for larger version. 

Name:	tabpanel_old.jpg 
Views:	59 
Size:	37.3 KB 
ID:	24724   Click image for larger version. 

Name:	tabpanel_new.jpg 
Views:	63 
Size:	33.4 KB 
ID:	24725  
    Last edited by fabricio.murta; Sep 06, 2016 at 2:28 PM.
  2. #2
    Hello!

    Have you tried wrapping your gridPanel in another panel? It will obey a hierarchy like this:

             > Panel 1 with tab title > Grid panel 1 with grid title & tools.
    tabPanel > Panel 2 with tab title > Grid panel 2 with grid title & tools.
             > Panel 3 with tab title > Grid panel 3 with grid title & tools.
    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello!

    We didn't hear from you for days now. Do you still need help in this issue?
    Fabrício Murta
    Developer & Support Expert
  4. #4
    Thanks for the reply, the workaround You proposed works well. I apologise for the delay.

    Best regards
    P.K.

Similar Threads

  1. [CLOSED] IE11 missing toolbar backgrounds
    By prointernet in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 30, 2014, 12:08 PM
  2. [CLOSED] TabPanel Toolbar button Text color
    By ISI in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: May 26, 2011, 6:27 PM
  3. Replies: 2
    Last Post: Jan 13, 2010, 10:01 AM
  4. Replies: 0
    Last Post: May 13, 2009, 2:54 PM
  5. AutoLoad is missing in TabPanel
    By koresx in forum 1.x Help
    Replies: 1
    Last Post: Dec 30, 2008, 5:24 AM

Posting Permissions