[CLOSED] Strange problem defining CommandColumns in Bin Tag of non-visible Container

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] Strange problem defining CommandColumns in Bin Tag of non-visible Container

    Defining CommandColumns in Bin-Tag of a non-visible Container like this

    <ext:Container ID="ItemByContractListContainer" runat="server" Visible="false">
       <Bin>
            <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
                <Html>
                <tpl for=".">
                    {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
                </tpl>
                </Html>
            </ext:XTemplate>
            <ext:ImageCommandColumn ID="SCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowSC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
            <ext:ImageCommandColumn ID="DCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowDC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
        </Bin>
        <Content>
            <Contract:AddItem ID="AddItem" runat="server"/>
        </Content>
        <Items>
            
        </Items>
    </ext:Container>
    leads to the following error:
    [{contentHtml:function(){Ext.net.append(Ext.getBody(),["
    "," ","
    ","
    Can you tell me what this error is about or how to fix it!?

    The strange thing is in another usercontrol it works:
    <ext:Container ID="ItemListPortletContainer" runat="server" Visible="False">
        <Bin>
            <ext:ImageCommandColumn ID="SCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowSC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
            <ext:ImageCommandColumn ID="DCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowDC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
            <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
                <Html>
                <tpl for=".">
                    {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
                </tpl>
                </Html>
            </ext:XTemplate>
        </Bin>
    </ext:Container>
    The only difference between the usercontrols is that the one which works is used inside an ext:Window Control and the other one inside an ext:Portal.
    Last edited by fabricio.murta; Mar 22, 2016 at 11:19 PM. Reason: no user feedback for 7+ days
  2. #2
    Hello @anwichmann!

    Can you provide a test case reproducing the issue so we can give you proper advice on why is the problem happening?

    If in doubt on how to come up with a simple runnable example, please refer to these posts:
    - Forum Guidelines For Posting New Topics
    - More information required
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Default.aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ExtNetTest.Default" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Title</title>
        <ext:ResourcePlaceHolder runat="server" />
    </head>
    <body>
    
    <script>
        function onButtonClick() {
            var panel = App['TestPanel'];
            if (panel) {
                panel.load({
                    callback: function() { panel.setActiveTab(panel.items.getCount() - 1); }
                });
            }
        }
    
        function gui_tab_change(tabPanel) {
            tabPanel.doLayout();
        }
    </script>
    
    
    <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager" runat="server"/>
    
        <div>
            <ext:Viewport ID="ViewPort" runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel runat="server" ID="WestPanel" Region="West" MinWidth="20" Border="false">
                    </ext:Panel>
    
                    <ext:Panel runat="server" ID="EastPanel" Region="East" MinWidth="20" Border="false">
                    </ext:Panel>
    
                    <ext:Panel runat="server" ID="CenterPanel" Region="Center" Layout="BorderLayout" Border="false">
                        <Items>
                            <%-- Header --%>
                            <ext:Panel ID="TopPanel" runat="server" BodyStyle="background-color: #FFFFFF" Region="North" Border="false">
                                <Items>
                                    <ext:Button ID="LoadButton" runat="server" Region="North" Text="1. Load Panel" OnClientClick="onButtonClick"/>
                                </Items>
                            </ext:Panel>
    
                            <%-- Spacer --%>
                            <ext:Panel ID="SpacerPanel" runat="server" BodyStyle="background-color: #FFFFFF" Region="North" Border="false" Height="10">
                            </ext:Panel>
    
                            <%-- Tab-Panel for Portal --%>
                            <ext:TabPanel runat="server" ID="TestPanel" Title="Test Case" Layout="BorderLayout"
                                          AutoPostBack="false" Region="Center">
                                <Listeners>
                                    <TabChange Fn="gui_tab_change"></TabChange>
                                </Listeners>
                                <Items>
                                </Items>
                                <Loader
                                    runat="server"
                                    AutoLoad="false"
                                    RemoveAll="false"
                                    DirectMethod="#{DirectMethods}.AddPortal"
                                    Mode="Component">
                                    <LoadMask ShowMask="true"/>
                                </Loader>
                            </ext:TabPanel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </div>
    </form>
    </body>
    </html>
    Default.aspx.cs
    using System.Web.UI;
    using Ext.Net;
    
    namespace ExtNetTest
    {
        public partial class Default : Page
        {
            [DirectMethod]
            public string AddPortal(string parameters)
            {
                var extPortal = this.CreateProtal();
                var result = ComponentLoader.ToConfig(extPortal, true);
    
                return result;
            }
    
            public Portal CreateProtal()
            {
                var extPortal = new Portal
                {
                    ID = "NewPortalTest",
                    Title = "New Portal Title",
                    Loader = new ComponentLoader {AutoLoad = false, Mode = LoadMode.Component}
                };
    
                var extPortalColumn = new PortalColumn
                {
                    ID = "NewPortalTestColumn",
                    ColumnWidth = 1
                };
    
                var extPortlet = new Portlet
                {
                    ID = "NewPortalTestPortlet",
                    Title = "Portlet Title",
                    Header = true,
                    Height = 500,
                    Layout = "Fit",
                    Collapsed = false,
                    Collapsible = true,
                    Closable = true
                };
    
                var ucl = new UserControlLoader();
                ucl.Path = "~/ContractPortlet.ascx";
    
                extPortlet.Items.Add(ucl);
                extPortalColumn.Items.Add(extPortlet);
                extPortal.Items.Add(extPortalColumn);
    
                return extPortal;
            }
        }
    }
    ContractPortlet.ascx
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContractPortlet.ascx.cs" Inherits="ExtNetTest.ContractPortlet" %>
    
    <script>
        var prepareItemListGridCommand = function(grid, command, record, row) {
            var recordVal = null;
            if (command.command == 'ShowSC') {
                recordVal = record.get("LastCheck_ServiceContractLevel");
            } else if (command.command == 'ShowDC') {
                recordVal = record.get("LastCheck_DeliveryContractLevel");
            }
    
            if (recordVal == null) {
                command.hidden = true;
            } else if (recordVal == 'Ok') {
                command.iconCls = "icon-bulletgreen";
            } else if (recordVal == 'Info') {
                command.iconCls = "icon-bulletblue";
            } else if (recordVal == 'Warning') {
                command.iconCls = "icon-bulletyellow";
            } else if (recordVal == 'Error') {
                command.iconCls = "icon-bulletred";
            }
        };
    
        var handleItemListGridCommand = function(grid, command, record, row) {
            var recordVal = null;
            var titel = null;
            if (command == 'ShowSC') {
                titel = "Prüfung DLV";
                recordVal = record.get("LastCheck_ServiceContractMessage");
            } else if (command == 'ShowDC') {
                titel = "Prüfung Liefervertrag";
                recordVal = record.get("LastCheck_DeliveryContractMessage");
            }
    
            if (recordVal != null && recordVal !== "") {
                Ext.Msg.alert(titel, recordVal);
            }
        };
    </script>
    
    <ext:Container ID="CheckColumnsContainer" runat="server" Hidden="True">
        <Bin>
            <ext:ImageCommandColumn ID="SCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowSC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
            <ext:ImageCommandColumn ID="DCColumn" runat="server">
                <PrepareCommand Fn="prepareItemListGridCommand"/>
                <Commands>
                    <ext:ImageCommand CommandName="ShowDC"/>
                </Commands>
                <Listeners>
                    <Command Fn="handleItemListGridCommand"/>
                </Listeners>
            </ext:ImageCommandColumn>
            <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
                <Html>
                <tpl for=".">
                    {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
                </tpl>
                </Html>
            </ext:XTemplate>
        </Bin>
    </ext:Container>
    Clicking Load Panel on top of the page throws the error.
  4. #4
    Hello @anwichmann!

    Is there a special reason you are using <ext:ImageCommandColumn /> outside a grid panel's columns definition? Because that is pretty much the reason your code is breaking to me.

    You said this worked when adding the user control into a window. I've changed your code to include also a loadable window, and it also didn't work.

    I also tried hardwiring your user control on the page, and then I get render errors cause the image command column is not defined inside a grid panel.

    Then I run more regression tests and finally, if I just change your user control's bin to this:
    <Bin>
        <ext:GridPanel runat="server" Title="gp1">
            <ColumnModel runat="server">
                <Columns>
                    <ext:ImageCommandColumn ID="SCColumn" runat="server">
                        <PrepareCommand Fn="prepareItemListGridCommand" />
                        <Commands>
                            <ext:ImageCommand CommandName="ShowSC" />
                        </Commands>
                        <Listeners>
                            <Command Fn="handleItemListGridCommand" />
                        </Listeners>
                    </ext:ImageCommandColumn>
                    <ext:ImageCommandColumn ID="DCColumn" runat="server">
                        <PrepareCommand Fn="prepareItemListGridCommand" />
                        <Commands>
                            <ext:ImageCommand CommandName="ShowDC" />
                        </Commands>
                        <Listeners>
                            <Command Fn="handleItemListGridCommand" />
                        </Listeners>
                    </ext:ImageCommandColumn>
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
        <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
            <Html>
            <tpl for=".">
                {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
            </tpl>
            </Html>
        </ext:XTemplate>
    </Bin>
    All works fine. I am afraid you cannot define the bare columns into somewhere's bin not a grid panel's due to context requirements.

    Does this make sense in your actual use case? I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Changing the usercontrol to
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContractPortlet.ascx.cs" Inherits="ExtNetTest.ContractPortlet" %>
    
    
    <ext:Container ID="CheckColumnsContainer" runat="server">
        <HtmlBin>
            <script>
                var prepareItemListGridCommand = function(grid, command, record, row) {
                    var recordVal = null;
                    if (command.command == 'ShowSC') {
                        recordVal = record.get("LastCheck_ServiceContractLevel");
                    } else if (command.command == 'ShowDC') {
                        recordVal = record.get("LastCheck_DeliveryContractLevel");
                    }
    
                    if (recordVal == null) {
                        command.hidden = true;
                    } else if (recordVal == 'Ok') {
                        command.iconCls = "icon-bulletgreen";
                    } else if (recordVal == 'Info') {
                        command.iconCls = "icon-bulletblue";
                    } else if (recordVal == 'Warning') {
                        command.iconCls = "icon-bulletyellow";
                    } else if (recordVal == 'Error') {
                        command.iconCls = "icon-bulletred";
                    }
                };
    
                var handleItemListGridCommand = function(grid, command, record, row) {
                    var recordVal = null;
                    var titel = null;
                    if (command == 'ShowSC') {
                        titel = "Prüfung DLV";
                        recordVal = record.get("LastCheck_ServiceContractMessage");
                    } else if (command == 'ShowDC') {
                        titel = "Prüfung Liefervertrag";
                        recordVal = record.get("LastCheck_DeliveryContractMessage");
                    }
    
                    if (recordVal != null && recordVal !== "") {
                        Ext.Msg.alert(titel, recordVal);
                    }
                };
            </script>
        </HtmlBin>
        <Bin>
            <ext:GridPanel runat="server" Title="gp1">
                <ColumnModel runat="server">
                    <Columns>
                        <ext:ImageCommandColumn ID="SCColumn" runat="server">
                            <PrepareCommand Fn="prepareItemListGridCommand"/>
                            <Commands>
                                <ext:ImageCommand CommandName="ShowSC"/>
                            </Commands>
                            <Listeners>
                                <Command Fn="handleItemListGridCommand"/>
                            </Listeners>
                        </ext:ImageCommandColumn>
                        <ext:ImageCommandColumn ID="DCColumn" runat="server">
                            <PrepareCommand Fn="prepareItemListGridCommand"/>
                            <Commands>
                                <ext:ImageCommand CommandName="ShowDC"/>
                            </Commands>
                            <Listeners>
                                <Command Fn="handleItemListGridCommand"/>
                            </Listeners>
                        </ext:ImageCommandColumn>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
            <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
                <Html>
                <tpl for=".">
                    {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
                </tpl>
                </Html>
            </ext:XTemplate>
        </Bin>
    </ext:Container>
    doesn't fix the problem for me.
  6. #6
    I have changed my control to look like yours and still I do not get any error when I click the buttons to fill the contents.

    The example below is almost yours, except that it also adds a window to add the contents to. If it fails for the Portal, also fails adding to the window.

    ASPX:
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Title</title>
        <ext:ResourcePlaceHolder runat="server" />
    </head>
    <body>
    
    <script runat="server">
        [DirectMethod]
        public string AddPortal(string parameters)
        {
            var extPortal = this.CreateProtal();
            var result = ComponentLoader.ToConfig(extPortal, true);
    
            return result;
        }
    
        public Portal CreateProtal()
        {
            var extPortal = new Portal
            {
                ID = "NewPortalTest",
                Title = "New Portal Title",
                Loader = new ComponentLoader { AutoLoad = false, Mode = LoadMode.Component }
            };
    
            var extPortalColumn = new PortalColumn
            {
                ID = "NewPortalTestColumn",
                ColumnWidth = 1
            };
    
            var extPortlet = new Portlet
            {
                ID = "NewPortalTestPortlet",
                Title = "Portlet Title",
                Header = true,
                Height = 500,
                Layout = "Fit",
                Collapsed = false,
                Collapsible = true,
                Closable = true
            };
    
            var ucl = new UserControlLoader();
            ucl.Path = "60639_binCmdCols.ascx";
    
            extPortlet.Items.Add(ucl);
    
            extPortalColumn.Items.Add(extPortlet);
            extPortal.Items.Add(extPortalColumn);
    
            return extPortal;
        }
    
        #region code to add control to window
        [DirectMethod]
        public string AddPnl(string parameters)
        {
            var extPnl = this.CreatePnl();
            var result = ComponentLoader.ToConfig(extPnl, true);
    
            return result;
        }
    
        public Ext.Net.Panel CreatePnl()
        {
            var extPnl = new Ext.Net.Panel()
            {
                ID = "NewPortalTest",
                Title = "New Portal Title (into window)",
                Frame = true,
                Loader = new ComponentLoader { AutoLoad = false, Mode = LoadMode.Component }
            };
    
            var ucl = new UserControlLoader();
            ucl.Path = "ContractPortlet.ascx"; // replace by control file name
    
            extPnl.Items.Add(ucl);
    
            return extPnl;
        }
        #endregion
    
    </script>
    <script>
        function onButtonClick() {
            var panel = App['TestPanel'];
            if (panel) {
                panel.load({
                    callback: function() { panel.setActiveTab(panel.items.getCount() - 1); }
                });
            }
        }
    
        // To handle window's button click
        function onButton2Click() {
            var wnd = App.wnd1;
            if (wnd) {
                wnd.load();
            }
        }
    
        function gui_tab_change(tabPanel) {
            tabPanel.doLayout();
        }
    
        var prepareItemListGridCommand = function(grid, command, record, row) {
            var recordVal = null;
            if (command.command == 'ShowSC') {
                recordVal = record.get("LastCheck_ServiceContractLevel");
            } else if (command.command == 'ShowDC') {
                recordVal = record.get("LastCheck_DeliveryContractLevel");
            }
    
            if (recordVal == null) {
                command.hidden = true;
            } else if (recordVal == 'Ok') {
                command.iconCls = "icon-bulletgreen";
            } else if (recordVal == 'Info') {
                command.iconCls = "icon-bulletblue";
            } else if (recordVal == 'Warning') {
                command.iconCls = "icon-bulletyellow";
            } else if (recordVal == 'Error') {
                command.iconCls = "icon-bulletred";
            }
        };
    
        var handleItemListGridCommand = function(grid, command, record, row) {
            var recordVal = null;
            var titel = null;
            if (command == 'ShowSC') {
                titel = "Prüfung DLV";
                recordVal = record.get("LastCheck_ServiceContractMessage");
            } else if (command == 'ShowDC') {
                titel = "Prüfung Liefervertrag";
                recordVal = record.get("LastCheck_DeliveryContractMessage");
            }
    
            if (recordVal != null && recordVal !== "") {
                Ext.Msg.alert(titel, recordVal);
            }
        };
    </script>
    
    
    <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager" runat="server"/>
    
        <div>
            <ext:Viewport ID="ViewPort" runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel runat="server" ID="WestPanel" Region="West" MinWidth="20" Border="false">
                    </ext:Panel>
    
                    <ext:Panel runat="server" ID="EastPanel" Region="East" MinWidth="20" Border="false">
                    </ext:Panel>
    
                    <ext:Panel runat="server" ID="CenterPanel" Region="Center" Layout="BorderLayout" Border="false">
                        <Items>
                            <%-- Header --%>
                            <ext:Panel ID="TopPanel" runat="server" BodyStyle="background-color: #FFFFFF" Region="North" Border="false">
                                <Items>
                                    <ext:Button ID="LoadButton" runat="server" Region="North" Text="1. Load Panel" OnClientClick="onButtonClick"/>
                                </Items>
                            </ext:Panel>
    
                            <%-- Spacer --%>
                            <ext:Panel ID="SpacerPanel" runat="server" BodyStyle="background-color: #FFFFFF" Region="North" Border="false" Height="10">
                            </ext:Panel>
    
                            <%-- Tab-Panel for Portal --%>
                            <ext:TabPanel runat="server" ID="TestPanel" Title="Test Case" Layout="BorderLayout"
                                          AutoPostBack="false" Region="Center">
                                <Listeners>
                                    <TabChange Fn="gui_tab_change"></TabChange>
                                </Listeners>
                                <Items>
                                </Items>
                                <Loader
                                    runat="server"
                                    AutoLoad="false"
                                    RemoveAll="false"
                                    DirectMethod="#{DirectMethods}.AddPortal"
                                    Mode="Component">
                                    <LoadMask ShowMask="true"/>
                                </Loader>
                            </ext:TabPanel>
                        </Items>
                    </ext:Panel>
                    <ext:Window runat="server" ID="wnd1" Width="600" Height="500">
                        <TopBar>
                            <ext:Toolbar runat="server">
                                <Items>
                                    <ext:Button ID="Button2" runat="server" Region="North" Text="2. Load Window" OnClientClick="onButton2Click"/>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <Loader
                            runat="server"
                            AutoLoad="false"
                            RemoveAll="false"
                            DirectMethod="#{DirectMethods}.AddPnl"
                            Mode="Component">
                            <LoadMask ShowMask="true" />
                        </Loader>
                    </ext:Window>
                </Items>
            </ext:Viewport>
        </div>
    </form>
    </body>
    </html>
    Control:
    <%@ Control Language="C#" %>
    
    <ext:Label runat="server" Text="My Control Contents (hidden)" />
    <ext:Container ID="CheckColumnsContainer" runat="server" Hidden="true">
        <HtmlBin>
            <script>
                var prepareItemListGridCommand = function (grid, command, record, row) {
                    var recordVal = null;
                    if (command.command == 'ShowSC') {
                        recordVal = record.get("LastCheck_ServiceContractLevel");
                    } else if (command.command == 'ShowDC') {
                        recordVal = record.get("LastCheck_DeliveryContractLevel");
                    }
    
                    if (recordVal == null) {
                        command.hidden = true;
                    } else if (recordVal == 'Ok') {
                        command.iconCls = "icon-bulletgreen";
                    } else if (recordVal == 'Info') {
                        command.iconCls = "icon-bulletblue";
                    } else if (recordVal == 'Warning') {
                        command.iconCls = "icon-bulletyellow";
                    } else if (recordVal == 'Error') {
                        command.iconCls = "icon-bulletred";
                    }
                };
    
                var handleItemListGridCommand = function (grid, command, record, row) {
                    var recordVal = null;
                    var titel = null;
                    if (command == 'ShowSC') {
                        titel = "Prüfung DLV";
                        recordVal = record.get("LastCheck_ServiceContractMessage");
                    } else if (command == 'ShowDC') {
                        titel = "Prüfung Liefervertrag";
                        recordVal = record.get("LastCheck_DeliveryContractMessage");
                    }
    
                    if (recordVal != null && recordVal !== "") {
                        Ext.Msg.alert(titel, recordVal);
                    }
                };
            </script>
        </HtmlBin>
        <Bin>
            <ext:GridPanel runat="server" Title="gp1">
                <ColumnModel runat="server">
                    <Columns>
                        <ext:ImageCommandColumn ID="SCColumn" runat="server">
                            <PrepareCommand Fn="prepareItemListGridCommand" />
                            <Commands>
                                <ext:ImageCommand CommandName="ShowSC" />
                            </Commands>
                            <Listeners>
                                <Command Fn="handleItemListGridCommand" />
                            </Listeners>
                        </ext:ImageCommandColumn>
                        <ext:ImageCommandColumn ID="DCColumn" runat="server">
                            <PrepareCommand Fn="prepareItemListGridCommand" />
                            <Commands>
                                <ext:ImageCommand CommandName="ShowDC" />
                            </Commands>
                            <Listeners>
                                <Command Fn="handleItemListGridCommand" />
                            </Listeners>
                        </ext:ImageCommandColumn>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
            <ext:XTemplate ID="PurchasePeriodTemplate" runat="server">
                <Html>
                <tpl for=".">
                    {LastCheck_PurchasePeriodStart:date("d.m.Y")} - {LastCheck_PurchasePeriodEnd:date("d.m.Y")}
                </tpl>
                </Html>
            </ext:XTemplate>
        </Bin>
    </ext:Container>
    I don't really see a difference in the relevant code -- assuming you updated the control's as you shown. And this is working fine. No JS errors, and the ext:label I added to the control is displayed when I click both the window's or the original load button.
    Fabrício Murta
    Developer & Support Expert
  7. #7
    Using the code you provided I still get the message
    [{contentHtml:function(){Ext.net.append(Ext.getBody(),["
    when clicking "1. Load Panel".

    If I click "2. Load Window" only the "Loading Data" Popup is shown in the window and nothing happens.

    Are you using a newer version of Ext.Net? I got version 3.3.0 installed.
  8. #8
    Hello @anwichmann!

    Hmm interesting point you raised, about the Ext.NET version. I was primarily testing it still on 3.2.1, in fact. But I just copypasted the code to the 3.3.0 project here and it... Yes, it failed, but wait, that's not all.

    It failed, and I've rebuilt the code a couple times. Seems there's an issue with VS and user controls where they don't get really prepared when you just define them. Took me a couple rebuilds and refreshes on the page and... voila, example works without any change on Ext.NET 3.3!

    Now I believe you are just stuck with the broken user control, somehow. The example I provided worked on both Ext.NET 3.2.1 & 3.3.0. And more than that, at least IE11 and Chrome 48 also worked with it.

    Can you try a little more with that sample unchanged and see if the control issue goes by itself? I've had a similar issue some time ago in a thread here and the user provided good advice on how to get rid of this user control cache issue. I will try to find it and add here in the meanwhile.
    Fabrício Murta
    Developer & Support Expert
  9. #9
    Here's the post with the user controls building/refreshing issue:

    Server Control, Bin Items Direct Event Submission - Post #13

    Although on VB.Net, basically it supports the fact that sometimes we have to rebuild a couple times to get a control registering correctly (exactly what just happened here!) and shares experiences on steps that usually fix the issue.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  10. #10
    I'm sorry, but I'm not able to get it working.
    Tried version 3.2.1, cleaning, rebuilding a few times. Not working.
    Updated to version 3.3.0 again, cleaning, rebuilding a few times. Not working.

    I just saw that hardwiring the usercontrol in Default.aspx does not throw any error.
    But we need to load the usercontrol dynamically.
    So I really think it must be another problem...

    Is it possible to send me your Solution which is working for you?
Page 1 of 3 123 LastLast

Similar Threads

  1. [CLOSED] toggle / untoggle all commandcolumns in a grid
    By blueworld in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 17, 2013, 7:32 AM
  2. Defining TreePanel with ToolTip
    By Elyfran Vaz in forum 2.x Help
    Replies: 4
    Last Post: Jan 14, 2013, 6:58 PM
  3. [CLOSED] Multiple commandcolumns in gridpanel
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 15, 2010, 11:34 AM
  4. [CLOSED] Strange button not visible issue
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 17, 2010, 10:20 PM
  5. Very strange problem...
    By Puia in forum 1.x Help
    Replies: 0
    Last Post: Mar 13, 2010, 12:09 PM

Posting Permissions