[CLOSED] [#321] [#324] Filter Deactivate event handler

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [#321] [#324] Filter Deactivate event handler

    Hi,

    Please consider the code sample below. I have two issues migrating this segment to 2.x so far in IE9:

    • Surprisingly, the Deactivate event is trigerred by merely moving the mouse over the menu checkbox - that never happened in 1.x
    • filter.menu.items.each iterator is no longer valid so I've tried filter.items.each, which worked the first time but subsequently failed


    I would appreciate your suggestions on code conversion and improvement.

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        private object[] TestData
        {
            get
            {
                var now = DateTime.Now;
                return new object[]
                {
                    new object[] { "3m Co", 71.72, 0.02, 0.03, now },
                    new object[] { "Alcoa Inc", 29.01, 0.42, 1.47, now },
                    new object[] { "Altria Group Inc", 83.81, 0.28, 0.34, now },
                    new object[] { "American Express Company", 52.55, 0.01, 0.02, now },
                    new object[] { "American International Group, Inc.", 64.13, 0.31, 0.49, now },
                    new object[] { "AT&T Inc.", 31.61, -0.48, -1.54, now },
                    new object[] { "Boeing Co.", 75.43, 0.53, 0.71, now },
                    new object[] { "Caterpillar Inc.", 67.27, 0.92, 1.39, now },
                    new object[] { "Citigroup, Inc.", 49.37, 0.02, 0.04, now },
                    new object[] { "E.I. du Pont de Nemours and Company", 40.48, 0.51, 1.28, now },
                    new object[] { "Exxon Mobil Corp", 68.1, -0.43, -0.64, now },
                    new object[] { "General Electric Company", 34.14, -0.08, -0.23, now },
                    new object[] { "Government Motors Corporation", 30.27, 1.09, 3.74, now },
                    new object[] { "Hewlett-Packard Co.", 36.53, -0.03, -0.08, now },
                    new object[] { "Honeywell Intl Inc", 38.77, 0.05, 0.13, now },
                    new object[] { "Intel Corporation", 19.88, 0.31, 1.58, now },
                    new object[] { "International Business Machines", 81.41, 0.44, 0.54, now },
                    new object[] { "Johnson & Johnson", 64.72, 0.06, 0.09, now },
                    new object[] { "JP Morgan & Chase & Co", 45.73, 0.07, 0.15, now },
                    new object[] { "McDonald\"s Corporation", 36.76, 0.86, 2.40, now },
                    new object[] { "Merck & Co., Inc.", 40.96, 0.41, 1.01, now },
                    new object[] { "Microsoft Corporation", 25.84, 0.14, 0.54, now },
                    new object[] { "Pfizer Inc", 27.96, 0.4, 1.45, now },
                    new object[] { "The Coca-Cola Company", 45.07, 0.26, 0.58, now },
                    new object[] { "The Home Depot, Inc.", 34.64, 0.35, 1.02, now },
                    new object[] { "The Procter & Gamble Company", 61.91, 0.01, 0.02, now },
                    new object[] { "United Technologies Corporation", 63.26, 0.55, 0.88, now },
                    new object[] { "Verizon Communications", 35.57, 0.39, 1.11, now },
                    new object[] { "Wal-Mart Stores, Inc.", 45.45, 0.73, 1.63, now }
                };
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
                this.Store1.DataBind();
            }
        }
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Local Data Paging - Ext.NET Examples</title>
        <script type="text/javascript">
            var onFilterDeactivate = function (filter, options) {
                filter.suspendEvents(false);
                switch (filter.type) {
                    case "boolean":
                        break;
                    case "date":
                        // Works the first time only throwing an error afterwards
                        filter.items.each(function (item) {
                            if (item instanceof Ext.menu.CheckItem)
                                item.setChecked(false);
                        });
    
                        // Doesn't work initially but then may become valid??
                        //                    filter.menu.items.each(function (item) {
                        //                        if (item instanceof Ext.menu.CheckItem)
                        //                            item.setChecked(false);
                        //                    });
                        break;
                    case "list":
                        filter.menu.items.each(function (item) {
                            item.setChecked(false);
                        });
                        break;
                    case "numeric":
                        filter.menu.items.each(function (item) {
                            if (item instanceof Ext.form.NumberField)
                                item.setValue("");
                        });
                        break;
                    case "string":
                        filter.menu.items.each(function (item) {
                            item.setValue("");
                        });
                        break;
                };
                filter.resumeEvents();
            };         
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:GridPanel ID="GridPanel1" runat="server" Flex="1" SelectionMemory="false">
                    <Store>
                        <ext:Store ID="Store1" runat="server" RemoteSort="false" AutoLoad="true" PageSize="10">
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="company">
                                    <Fields>
                                        <ext:ModelField Name="company" />
                                        <ext:ModelField Name="price" Type="Float" />
                                        <ext:ModelField Name="change" Type="Float" />
                                        <ext:ModelField Name="pctChange" Type="Float" />
                                        <ext:ModelField Name="lastChange" Type="Date" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Width="200">
                                <Editor>
                                    <ext:TextField ID="TextField1" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column2" runat="server" Text="Price" Width="75" DataIndex="price">
                                <Editor>
                                    <ext:TextField ID="TextField2" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column3" runat="server" Text="Change" Width="100" DataIndex="change" />
                            <ext:Column ID="Column4" runat="server" Text="Change" Width="100" DataIndex="pctChange" />
                            <ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" Width="120" DataIndex="lastChange"
                                Format="HH:mm:ss" />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Multi" />
                    </SelectionModel>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:DateFilter DataIndex="lastChange">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                    <Listeners>
                                        <Deactivate Fn="onFilterDeactivate" />
                                    </Listeners>
                                </ext:DateFilter>
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by fabricio.murta; Jun 20, 2018 at 7:37 PM.
  2. #2
    Hello!

    It's strange. We are investigating.
  3. #3
    Hi,

    1. Reproduced with pure ExtJS.
    http://www.sencha.com/forum/showthread.php?269741

    Created an Issue.
    https://github.com/extnet/Ext.NET/issues/321

    Fixed in the trunk, in the revision 5330. Thank you for the report.

    2. I think this should work after updating form the trunk.
    filter.menu.items.each(...);
  4. #4
    Confirmed. The issue in question is no longer reproducible in my setup, thanks!
  5. #5
    Hi,

    Please consider the code sample below. It seems like the bug being tracked in this thread is reproducible with the ListFilter the way it was with the DateFilter. Another issue with this sample is that StringFilter is never activated and that appears to be due to the event handlers attached to it. If you comment them all out, the issue disappears. Please advise if you require more information.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        private object[] TestData
        {
            get
            {
                var now = DateTime.Now;
                return new object[]
                {
                    new object[] { "3m Co", "Conglomerates", 71.72, 0.02, 0.03, now },
                    new object[] { "Alcoa Inc", "Basic Materials", 29.01, 0.42, 1.47, now },
                    new object[] { "Altria Group Inc", "Consumer Goods",  83.81, 0.28, 0.34, now },
                    new object[] { "American Express Company", "Financial", 52.55, 0.01, 0.02, now },
                    new object[] { "American International Group, Inc.", "Financial", 64.13, 0.31, 0.49, now },
                    new object[] { "AT&T Inc.", "Technology", 31.61, -0.48, -1.54, now },
                    new object[] { "Boeing Co.", "Industrial", 75.43, 0.53, 0.71, now },
                    new object[] { "Caterpillar Inc.", "Industrial", 67.27, 0.92, 1.39, now },
                    new object[] { "Citigroup, Inc.", "Financial", 49.37, 0.02, 0.04, now },
                    new object[] { "E.I. du Pont de Nemours and Company", "Basic Materials", 40.48, 0.51, 1.28, now },
                    new object[] { "Exxon Mobil Corp", "Energy", 68.1, -0.43, -0.64, now },
                    new object[] { "General Electric Company", "Industrial", 34.14, -0.08, -0.23, now },
                    new object[] { "General Motors Corporation", "Consumer", 30.27, 1.09, 3.74, now },
                    new object[] { "Hewlett-Packard Co.", "Technology", 36.53, -0.03, -0.08, now },
                    new object[] { "Honeywell Intl Inc", "Industrial", 38.77, 0.05, 0.13, now },
                    new object[] { "Intel Corporation", "Technology", 19.88, 0.31, 1.58, now },
                    new object[] { "International Business Machines", "Technology", 81.41, 0.44, 0.54, now },
                    new object[] { "Johnson & Johnson", "Consumer", 64.72, 0.06, 0.09, now },
                    new object[] { "JP Morgan & Chase & Co", "Financial", 45.73, 0.07, 0.15, now },
                    new object[] { "McDonald\"s Corporation", "Consumer", 36.76, 0.86, 2.40, now },
                    new object[] { "Merck & Co., Inc.", "Consumer", 40.96, 0.41, 1.01, now },
                    new object[] { "Microsoft Corporation", "Technology", 25.84, 0.14, 0.54, now },
                    new object[] { "Pfizer Inc", "Consumer", 27.96, 0.4, 1.45, now },
                    new object[] { "The Coca-Cola Company", "Consumer", 45.07, 0.26, 0.58, now },
                    new object[] { "The Home Depot, Inc.", "Consumer", 34.64, 0.35, 1.02, now },
                    new object[] { "The Procter & Gamble Company", "Consumer", 61.91, 0.01, 0.02, now },
                    new object[] { "United Technologies Corporation", "Industrial", 63.26, 0.55, 0.88, now },
                    new object[] { "Verizon Communications", "Communications", 35.57, 0.39, 1.11, now },
                    new object[] { "Wal-Mart Stores, Inc.", "Consumer", 45.45, 0.73, 1.63, now }
                };
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
                this.Store1.DataBind();
            }
        }
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Local Data Paging - Ext.NET Examples</title>
        <script type="text/javascript">
            var onFilterDeactivate = function (filter, options) {
                filter.suspendEvents(false);
                switch (filter.type) {
                    case "boolean":
                        break;
                    case "date":
                        filter.menu.items.each(function (item) {
                            if (item instanceof Ext.menu.CheckItem)
                                item.setChecked(false);
                        });
                        break;
                    case "list":
                        filter.menu.items.each(function (item) {
                            item.setChecked(false);
                        });
                        break;
                    case "numeric":
                        filter.menu.items.each(function (item) {
                            if (item instanceof Ext.form.NumberField)
                                item.setValue("");
                        });
                        break;
                    case "string":
                        filter.menu.items.each(function (item) {
                            item.setValue("");
                        });
                        break;
                };
                filter.resumeEvents();
            };
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:GridPanel ID="GridPanel1" runat="server" Flex="1" SelectionMemory="false">
                    <Store>
                        <ext:Store ID="Store1" runat="server" RemoteSort="false" AutoLoad="true" PageSize="10">
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="company">
                                    <Fields>
                                        <ext:ModelField Name="company" />
                                        <ext:ModelField Name="industry" />
                                        <ext:ModelField Name="price" Type="Float" />
                                        <ext:ModelField Name="change" Type="Float" />
                                        <ext:ModelField Name="pctChange" Type="Float" />
                                        <ext:ModelField Name="lastChange" Type="Date" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Width="200">
                                <Editor>
                                    <ext:TextField ID="TextField1" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column2" runat="server" Text="Industry" DataIndex="industry" Width="200">
                            </ext:Column>
                            <ext:Column ID="Column3" runat="server" Text="Price" Width="75" DataIndex="price">
                                <Editor>
                                    <ext:TextField ID="TextField2" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column4" runat="server" Text="Change" Width="100" DataIndex="change" />
                            <ext:Column ID="Column5" runat="server" Text="Change" Width="100" DataIndex="pctChange" />
                            <ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" Width="120" DataIndex="lastChange"
                                Format="HH:mm:ss" />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Multi" />
                    </SelectionModel>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:StringFilter DataIndex="company" EmptyText="Type in description...">
                                    <Listeners>
                                        <Deactivate Fn="onFilterDeactivate" />
                                        <Activate Handler="Ext.Msg.alert('Prompt', 'Activated!');">
                                        </Activate>
                                        <Update Handler="Ext.Msg.alert('Prompt', 'Updated!');">
                                        </Update>
                                    </Listeners>
                                </ext:StringFilter>
                                <ext:ListFilter DataIndex="industry" Options="Conglomerates,Basic Materials,Consumer Goods,Financial,Technology,Industrial,Energy,Consumer,Communications">
                                    <Listeners>
                                        <Deactivate Fn="onFilterDeactivate" />
                                        <Activate Handler="Ext.Msg.alert('Prompt', 'Activated!');">
                                        </Activate>
                                        <Update Handler="Ext.Msg.alert('Prompt', 'Updated!');">
                                        </Update>
                                    </Listeners>
                                </ext:ListFilter>
                                <ext:DateFilter DataIndex="lastChange">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                    <Listeners>
                                        <Deactivate Fn="onFilterDeactivate" />
                                        <Activate Handler="Ext.Msg.alert('Prompt', 'Activated!');">
                                        </Activate>
                                        <Update Handler="Ext.Msg.alert('Prompt', 'Updated!');">
                                        </Update>
                                    </Listeners>
                                </ext:DateFilter>
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                            </Items>
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
  6. #6
    1. The issue with ListFilter is fixed in SVN.

    2. The issue with StringFitler is fixed in SVN. Also, reported to Sencha
    http://www.sencha.com/forum/showthread.php?269915

    and created an Issue:
    https://github.com/extnet/Ext.NET/issues/324

    Please update and retest.
  7. #7
    Confirmed. Thanks for the fix Daniil!
  8. #8
    Thank you for the confirmation!
  9. #9
    Hi Daniil,

    I've just noticed that the StringFilter feature now works properly only with event handlers defined. If there's none, it breaks as before.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        private object[] TestData
        {
            get
            {
                var now = DateTime.Now;
                return new object[]
                {
                    new object[] { "3m Co", "Conglomerates", 71.72, 0.02, 0.03, now, true },
                    new object[] { "Alcoa Inc", "Basic Materials", 29.01, 0.42, 1.47, now, true },
                    new object[] { "Altria Group Inc", "Consumer Goods",  83.81, 0.28, 0.34, now, true },
                    new object[] { "American Express Company", "Financial", 52.55, 0.01, 0.02, now, true },
                    new object[] { "American International Group, Inc.", "Financial", 64.13, 0.31, 0.49, now, false },
                    new object[] { "AT&T Inc.", "Technology", 31.61, -0.48, -1.54, now, false },
                    new object[] { "Boeing Co.", "Industrial", 75.43, 0.53, 0.71, now, false },
                    new object[] { "Caterpillar Inc.", "Industrial", 67.27, 0.92, 1.39, now, false },
                    new object[] { "Citigroup, Inc.", "Financial", 49.37, 0.02, 0.04, now, false },
                    new object[] { "E.I. du Pont de Nemours and Company", "Basic Materials", 40.48, 0.51, 1.28, now, false },
                    new object[] { "Exxon Mobil Corp", "Energy", 68.1, -0.43, -0.64, now, true },
                    new object[] { "General Electric Company", "Industrial", 34.14, -0.08, -0.23, now, true },
                    new object[] { "General Motors Corporation", "Consumer", 30.27, 1.09, 3.74, now, true },
                    new object[] { "Hewlett-Packard Co.", "Technology", 36.53, -0.03, -0.08, now, true },
                    new object[] { "Honeywell Intl Inc", "Industrial", 38.77, 0.05, 0.13, now, true },
                    new object[] { "Intel Corporation", "Technology", 19.88, 0.31, 1.58, now, false },
                    new object[] { "International Business Machines", "Technology", 81.41, 0.44, 0.54, now, false },
                    new object[] { "Johnson & Johnson", "Consumer", 64.72, 0.06, 0.09, now, false },
                    new object[] { "JP Morgan & Chase & Co", "Financial", 45.73, 0.07, 0.15, now, false },
                    new object[] { "McDonald\"s Corporation", "Consumer", 36.76, 0.86, 2.40, now, false },
                    new object[] { "Merck & Co., Inc.", "Consumer", 40.96, 0.41, 1.01, now, true },
                    new object[] { "Microsoft Corporation", "Technology", 25.84, 0.14, 0.54, now, false },
                    new object[] { "Pfizer Inc", "Consumer", 27.96, 0.4, 1.45, now, false},
                    new object[] { "The Coca-Cola Company", "Consumer", 45.07, 0.26, 0.58, now, true },
                    new object[] { "The Home Depot, Inc.", "Consumer", 34.64, 0.35, 1.02, now, true },
                    new object[] { "The Procter & Gamble Company", "Consumer", 61.91, 0.01, 0.02, now, true },
                    new object[] { "United Technologies Corporation", "Industrial", 63.26, 0.55, 0.88, now, true },
                    new object[] { "Verizon Communications", "Communications", 35.57, 0.39, 1.11, now, true },
                    new object[] { "Wal-Mart Stores, Inc.", "Consumer", 45.45, 0.73, 1.63, now, true }
                };
            }
        }
    
        private object[] GetIndustry
        {
            get
            {
                return new object[]
                {
                    new object[] { "Conglomerates" },
                    new object[] { "Basic Materials" },
                    new object[] { "Consumer Goods" },
                    new object[] { "Financial" },
                    new object[] { "Technology" },
                    new object[] { "Industrial" },
                    new object[] { "Energy" },
                    new object[] { "Consumer" },
                    new object[] { "Communications" }
                };
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
                this.Store1.DataBind();
    
                this.StoreIndustry.DataSource = this.GetIndustry;
                this.StoreIndustry.DataBind();
            }
        }
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Local Data Paging - Ext.NET Examples</title>
        <script type="text/javascript">
    
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Store ID="StoreIndustry" runat="server" AutoLoad="true">
            <Model>
                <ext:Model runat="server" IDProperty="company">
                    <Fields>
                        <ext:ModelField Name="industry" />
                    </Fields>
                </ext:Model>
            </Model>
        </ext:Store>
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:GridPanel ID="GridPanel1" runat="server" Flex="1" SelectionMemory="false">
                    <Store>
                        <ext:Store ID="Store1" runat="server" RemoteSort="false" AutoLoad="true" PageSize="10">
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="company">
                                    <Fields>
                                        <ext:ModelField Name="company" />
                                        <ext:ModelField Name="industry" />
                                        <ext:ModelField Name="price" Type="Float" />
                                        <ext:ModelField Name="change" Type="Float" />
                                        <ext:ModelField Name="pctChange" Type="Float" />
                                        <ext:ModelField Name="lastChange" Type="Date" />
                                        <ext:ModelField Name="visible" Type="Boolean" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Width="200">
                                <Editor>
                                    <ext:TextField ID="TextField1" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column2" runat="server" Text="Industry" DataIndex="industry" Width="200">
                            </ext:Column>
                            <ext:Column ID="Column3" runat="server" Text="Price" Width="75" DataIndex="price">
                                <Editor>
                                    <ext:TextField ID="TextField2" runat="server" />
                                </Editor>
                            </ext:Column>
                            <ext:Column ID="Column4" runat="server" Text="Change" Width="100" DataIndex="change" />
                            <ext:Column ID="Column5" runat="server" Text="Change" Width="100" DataIndex="pctChange" />
                            <ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" Width="120" DataIndex="lastChange"
                                Format="HH:mm:ss" />
                            <ext:Column ID="Column6" runat="server" Text="Visible" DataIndex="visible" Align="Center">
                                <Renderer Handler="return (value) ? 'Yes':'No';" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
                    </SelectionModel>
                    <Features>
                        <ext:GridFilters runat="server" Local="true">
                            <Filters>
                                <ext:StringFilter DataIndex="company" EmptyText="Type in description...">
                                    <Listeners>
                                        <Deactivate Handler="Ext.Msg.alert('Prompt', 'Activated!');" />
                                        <Activate Handler="Ext.Msg.alert('Prompt', 'Activated!');" />
                                        <Update Handler="Ext.Msg.alert('Prompt', 'Updated!');" />
                                    </Listeners>
                                </ext:StringFilter>
                                <ext:ListFilter DataIndex="industry" LabelField="industry" IDField="industry" StoreID="StoreIndustry">
                                    <Listeners>
                                        <Deactivate Handler="Ext.Msg.alert('Prompt', 'Activated!');" />
                                        <Activate Handler="Ext.Msg.alert('Prompt', 'Activated!');" />
                                        <Update Handler="Ext.Msg.alert('Prompt', 'Updated!');" />
                                    </Listeners>
                                </ext:ListFilter>
                                <ext:DateFilter DataIndex="lastChange">
                                    <DatePickerOptions runat="server" TodayText="Now" />
                                </ext:DateFilter>
                                <ext:BooleanFilter DataIndex="visible">
                                </ext:BooleanFilter>
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                            </Items>
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
  10. #10
    Got it. Please try this fix:
    Ext.ux.grid.filter.StringFilter.override({
        init : function (config) {
            Ext.applyIf(config, {
                enableKeyEvents: true,
                labelCls: 'ux-rangemenu-icon ' + this.iconCls,
                hideEmptyLabel: false,
                labelSeparator: '',
                labelWidth: 29                       
            });
    
            if (!config.listeners) {
                config.listeners = {};
            }
    
            Ext.applyIf(config.listeners, {
                scope: this,
                keyup: this.onInputKeyUp,
                el: {
                    click: function(e) {
                        e.stopPropagation();
                    }
                }
            });
    
            this.inputItem = Ext.create('Ext.form.field.Text', config);
            this.menu.add(this.inputItem);
            this.menu.showSeparator = false;
            this.updateTask = Ext.create('Ext.util.DelayedTask', this.fireUpdate, this);
        }
    });
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: May 31, 2013, 8:06 AM
  2. Replies: 6
    Last Post: Apr 30, 2013, 1:44 PM
  3. Replies: 0
    Last Post: Sep 11, 2012, 5:14 PM
  4. [CLOSED] Event handler before direct event handlers
    By matejgolob in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 08, 2012, 2:31 PM
  5. Replies: 2
    Last Post: May 01, 2012, 4:57 PM

Tags for this Thread

Posting Permissions