[FIXED] [1.1.0] Help need in examples(demos)

  1. #1

    [FIXED] [1.1.0] Help need in examples(demos)

    Hi

    i have used the example https://examples1.ext.net/#/Form/ComboBox/Custom_Search/.
    i have entered '*'(asterisk) in the combo box it has populated me all the list items, but when i move the mouse pointer out of the control and use mouse Wheel to scroll up or down the entered '*'(asterisk) and expanded list is getting disappeared ,so i re-entered '*'(asterisk) but the list is not shown Can anyone help me since i am using the same this control in my application i am facing the same problem.

    I have already posted regarding this issue you can refer Post Title "Problem with ComboBox scrolling".

    Thanks
    venu
    Last edited by Daniil; Aug 08, 2011 at 1:36 PM. Reason: [FIXED]
  2. #2
    Hi,

    Thanks for the report the problem. We will investigate.

    Quote Originally Posted by venu.sn2009 View Post
    I have already posted regarding this issue you can refer Post Title "Problem with ComboBox scrolling".
    Please post a link.
  3. #3

    Problem with ComboBox scrolling

  4. #4
    Thanks.

    Please feel free to bump a thread it it leaves non answered. Please don't duplicate threads.

    To fix the problem, please add this code within a page's <head>.
    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    <script type="text/javascript">
        Ext.form.ComboBox.prototype.triggerBlur = Ext.form.ComboBox.prototype.triggerBlur.createSequence(function () {
            this.blur();
        });
    </script>
    Here is the full code sample.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="System.Linq" %>
    <script runat="server">
        private object[] MyData =
            new object[] 
            {
                new object[] { "a" },
                new object[] { "b" },
                new object[] { "c" },
                new object[] { "a1" },
                new object[] { "b1" },
                new object[] { "b2" }
            };
    
        protected void Store_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            Store store = sender as Store;
            string filter = e.Parameters["query"];
            if (filter.Equals("*"))
            {
                store.DataSource = MyData;
            }
            else
            {
                store.DataSource = from x in MyData
                                   where (x as object[])[0].ToString().StartsWith(filter)
                                   select x;
            };
            
            store.DataBind();
        }
    </script>
    <!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>Ext.Net Example</title>
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
        <script type="text/javascript">
            Ext.form.ComboBox.prototype.triggerBlur = Ext.form.ComboBox.prototype.triggerBlur.createSequence(function () {
                this.blur();
            });
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:ComboBox 
                runat="server" 
                DisplayField="test" 
                ValueField="test" 
                TypeAhead="false"
                LoadingText="Searching..." 
                MinChars="1" 
                HideTrigger="true">
                <Store>
                    <ext:Store runat="server" AutoLoad="false" OnRefreshData="Store_Refresh">
                        <Proxy>
                            <ext:PageProxy />
                        </Proxy>
                        <Reader>
                            <ext:ArrayReader>
                                <Fields>
                                    <ext:RecordField Name="test" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                </Store>
            </ext:ComboBox>
        </form>
    </body>
    </html>
  5. #5
    Here is the improved fix.
    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    <script type="text/javascript">
        Ext.form.ComboBox.override({
            triggerBlur : function () {
                this.mimicing = false;
                Ext.getDoc().un("mousedown", this.mimicBlur, this);
            
                if (this.monitorTab && this.el) {
                    this.el.un("keydown", this.checkTab, this);
                }
            
                this.checkOnBlur();
    
                Ext.form.TriggerField.superclass.onBlur.call(this);
            
                if (this.wrap) {
                    this.wrap.removeClass(this.wrapFocusClass);
                }
            }
        });
    </script>
    The fix has been added in SVN and will be available in a next official release.
    Last edited by Daniil; Dec 05, 2011 at 6:06 AM.

Similar Threads

  1. Ext.NET v2 MVC demos needs updating.
    By rstpo in forum 2.x Help
    Replies: 0
    Last Post: Aug 02, 2012, 7:40 AM
  2. [CLOSED] TabBar Config examples in Examples Explorer not working
    By anup in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 26, 2012, 9:32 AM
  3. Replies: 2
    Last Post: Sep 28, 2011, 2:19 AM
  4. Replies: 2
    Last Post: Jun 24, 2011, 5:33 PM
  5. Replies: 2
    Last Post: Jan 21, 2009, 2:18 PM

Tags for this Thread

Posting Permissions