[CLOSED] [1.0] MultiCombo Change listener not working as expected

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [1.0] MultiCombo Change listener not working as expected

    On this page, the first 2 items in the combo box are selected. if you uncheck the 2nd item and click out of the combo, you see the notification. If you recheck it, nothing happens. Also, after rechecking it, unchecking it no longer displays the notification.

    Am I doing something wrong?

    <!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>
            <script runat="server">
                
                <Ext.Net.DirectMethod()> _
                Public Sub RefreshSomething()
                    Ext.Net.Notification.Show( _
                        New Ext.Net.NotificationConfig With { _
                            .Title = "Test", _
                            .HideDelay = 1000, _
                            .Width = 300, _
                            .Html = "Selected: " & Join((From x In TheChoices.SelectedItems Select x.Text).ToArray, ", "), _
                            .AlignCfg = New Ext.Net.NotificationAlignConfig With { _
                                .ElementAnchor = Ext.Net.AnchorPoint.BottomLeft, _
                                .TargetAnchor = Ext.Net.AnchorPoint.BottomLeft, _
                                .OffsetX = 20, _
                                .OffsetY = -20 _
                            } _
                        } _
                    )
                End Sub
                
            </script>
        </head>
    </head>
    <body>
        <form id="form1" runat="server">
        
        <script type="text/javascript">
    
            var refreshSomething = function() {
                Ext.net.DirectMethods.RefreshSomething({
                    success: function(result) {
                        var x = 1;
                    }
                });
            };
            
        </script>
        
        <ext:ResourceManager runat="server" />
        
        <ext:MultiCombo ID="TheChoices" runat="server">
            <Items>
                <ext:ListItem Text="Test1" Value="1" />
                <ext:ListItem Text="Test2" Value="2" />
                <ext:ListItem Text="Test3" Value="3" />
            </Items>
            <SelectedItems>
                <ext:SelectedListItem Value="1" />
                <ext:SelectedListItem Value="2" />
            </SelectedItems>
            <Listeners>
                <Change Handler="refreshSomething();" />
            </Listeners>
        </ext:MultiCombo>
        
        </form>
    </body>
    </html>
    Last edited by Daniil; Aug 25, 2010 at 12:35 PM. Reason: Marked as [CLOSED]. No more information was provided.
  2. #2
    Hello!

    I'm trying to reproduce it with the same C# code but I can't...The notification appears as expected. Maybe updating from the SVN will solve this problem. Please try it.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        [Ext.Net.DirectMethod]
        public void RefreshSomething()
        {
            NotificationConfig config = new NotificationConfig();
            config.Title = "Title";
            config.HideDelay = 1000;
            config.Width = 300;
    
            String html = "Selected: ";
            foreach (Ext.Net.SelectedListItem item in MultiCombo1.SelectedItems)
            {
                html += item.Text;
            }
            config.Html = html;
            
            NotificationAlignConfig alignConfig = new NotificationAlignConfig();
            alignConfig.ElementAnchor = Ext.Net.AnchorPoint.BottomLeft;
            alignConfig.TargetAnchor = Ext.Net.AnchorPoint.BottomLeft;
            alignConfig.OffsetX = 20;
            alignConfig.OffsetY = -20;
            config.AlignCfg = alignConfig;
            Ext.Net.Notification.Show(config);
        }
    </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>
    
        <script type="text/javascript">
    
            var refreshSomething = function() {
                Ext.net.DirectMethods.RefreshSomething({
                    success: function(result) {
                        var x = 1;
                    }
                });
            };
             
        </script>
    
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:MultiCombo ID="MultiCombo1" runat="server">
            <Items>
                <ext:ListItem Text="Test1" Value="1" />
                <ext:ListItem Text="Test2" Value="2" />
                <ext:ListItem Text="Test3" Value="3" />
            </Items>
            <SelectedItems>
                <ext:SelectedListItem Value="1" />
                <ext:SelectedListItem Value="2" />
            </SelectedItems>
            <Listeners>
                <Change Handler="refreshSomething();" />
            </Listeners>
        </ext:MultiCombo>
        </form>
    </body>
    </html>
  3. #3
    I updated a few minutes before I posted. Could it be browser specific? I'm using IE8.

    Verified that it doesn't work in Chrome, as well.

    Ext.Net version: 1.0.3883.21545
  4. #4
    Could it be browser specific?
    Generally speaking it's possible. But I tested it on IE8 too.

    Please ensure that the latest Ext.Net dll is used in your application.
    One more question. Is this a full sample code which reproduces the issue on your machine?
  5. #5
    Did you do the steps like I specified?

    1. Uncheck item 2, and click out of box (should appear)
    2. Recheck item 2 and click out of box (does not appear)
  6. #6
    Quote Originally Posted by Daniil View Post
    Generally speaking it's possible. But I tested it on IE8 too.

    Please ensure that the latest Ext.Net dll is used in your application.
    One more question. Is this a full sample code which reproduces the issue on your machine?
    It is updated, I've verified this.

    Yes. This is the exact code that I'm testing.
  7. #7
    Hello!

    Did you do the steps like I specified?

    1. Uncheck item 2, and click out of box (should appear)
    2. Recheck item 2 and click out of box (does not appear)
    Yes, I exactly did these steps.

    It is updated, I've verified this.

    Yes. This is the exact code that I'm testing.
    Strange...I still can't reproduce the issue.
    Well, could you test this code on other browser (not IE8) on your machine?
  8. #8
    Yes. I tried it on Chrome, Safari, and Firefox. All browsers had the same behavior.
  9. #9
    Also, I've noticed that it only seems to do this when you have a <SelectedItems> section defined.
  10. #10
    Hi,

    I tested the code sample posted by @Daniil above and it appears to work correctly in all browsers, including IE8.
    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: Jun 19, 2012, 9:06 PM
  2. SelectListItem of MultiCombo not working
    By Rupesh in forum 1.x Help
    Replies: 0
    Last Post: May 24, 2012, 10:08 AM
  3. Replies: 0
    Last Post: Feb 06, 2012, 7:29 PM
  4. [CLOSED] SelectionModel.SelectAll() Not Working As Expected
    By garrisrd in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 09, 2011, 8:30 AM
  5. [CLOSED] SelectItem not working for MultiCombo
    By klaus.schwarz in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 12, 2010, 9:58 AM

Posting Permissions