C1ComboBox - c1ComboBox.SelectedIndexChanged call event 2 times

Posted by: samo3889 on 7 January 2018, 9:58 pm EST

    • Post Options:
    • Link

    Posted 7 January 2018, 9:58 pm EST

    Hi all

    i use C1ComboBox (c1.win.c1input.4)

    i add event c1ComboBox.SelectedIndexChanged

    when i change index call to event c1ComboBox.SelectedIndexChanged 2 times

    look at the follwoing example :c1CombBox_SimpleExample.zip

    thanks

    saleem :)c1CombBox_SimpleExample.zip

  • Posted 8 January 2018, 5:16 pm EST

    Hi Saleem!

    I have reported this issue to the development team [Internal ID : 304408], and will inform you once it is resolved.

    Best regards,

    Meenakshi

  • Posted 8 January 2018, 9:25 pm EST

    ok thanks Meenakshi

    i wait for response :slight_smile:

    saleem.

  • Posted 11 February 2018, 9:09 pm EST

    Hi Saleem!

    I am in touch with the development team, and have raised the priority of case. I’ll update you once I hear anything from them.

    Thanks,

    Meenakshi

  • Posted 13 February 2018, 4:01 am EST

    Hi Meenakshi

    I found a solution around the bug

    simply i write overwrite extension for SelectedIndex Property and use SelectedIndexEx instead SelectedIndex.

    public partial class C1ComboBoxEx : C1ComboBox

    {

    public C1ComboBoxEx()

    {

    InitializeComponent();

    }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }
    
        private int _selectedIndexEx;
    
        public int SelectedIndexEx
        {
            get
            {
                return this._selectedIndexEx;
            }
            set
            {
                if (value < -1 || value >= this.Items.Count)
                {
                    throw new ArgumentOutOfRangeException();
                }
                if (this._selectedIndexEx != value)
                {
                    this._selectedIndexEx = value;
                    this.SelectedIndex = value;
                }
            }
        }
    }
    

    thanks !!!

    Saleem :slight_smile:

  • Posted 27 August 2018, 6:13 pm EST

    Hi Saleem!

    The issue could be found fixed in the latest builds. Please download the builds from the given link and check:

    http://prerelease.componentone.com/dotnet40/c1winforms/2018-t2/C1WinForms.4_4.0.20182.318.zip

    Best regards,

    Meenakshi

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels