This is a migrated thread and some comments may be shown as answers.

SelectedValueChanged Fired Twice

5 Answers 328 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
renemt
Top achievements
Rank 2
renemt asked on 02 Feb 2009, 08:22 AM
I'm using RadControls for WinForms 2008.3 1321 (control version 8.2.0.0) and found the following issue:

The SelectedValueChanged event of the RadComboBox fires two times when the item selection changes. I'm able to reproduce this with the following small WinForms test project:

Form1.Designer.cs
namespace RadComboTest 
    partial class Form1 
    { 
        /// <summary> 
        /// Required designer variable. 
        /// </summary> 
        private System.ComponentModel.IContainer components = null
 
        /// <summary> 
        /// Clean up any resources being used. 
        /// </summary> 
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 
        protected override void Dispose(bool disposing) 
        { 
            if (disposing && (components != null)) 
            { 
                components.Dispose(); 
            } 
            base.Dispose(disposing); 
        } 
        #region Windows Form Designer generated code 
 
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor. 
        /// </summary> 
        private void InitializeComponent() 
        { 
            this.radComboBox1 = new Telerik.WinControls.UI.RadComboBox(); 
            ((System.ComponentModel.ISupportInitialize)(this.radComboBox1)).BeginInit(); 
            this.SuspendLayout(); 
            //  
            // radComboBox1 
            //  
            this.radComboBox1.Location = new System.Drawing.Point(12, 12); 
            this.radComboBox1.Name = "radComboBox1"
            //  
            //  
            //  
            this.radComboBox1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren; 
            this.radComboBox1.Size = new System.Drawing.Size(260, 20); 
            this.radComboBox1.TabIndex = 0; 
            this.radComboBox1.Text = "radComboBox1"
            //  
            // Form1 
            //  
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
            this.ClientSize = new System.Drawing.Size(284, 264); 
            this.Controls.Add(this.radComboBox1); 
            this.Name = "Form1"
            this.Text = "Form1"
            ((System.ComponentModel.ISupportInitialize)(this.radComboBox1)).EndInit(); 
            this.ResumeLayout(false); 
            this.PerformLayout(); 
 
        } 
        #endregion 
 
        private Telerik.WinControls.UI.RadComboBox radComboBox1; 
    } 
 
 

Form1.cs
using System; 
using System.Diagnostics; 
using System.Windows.Forms; 
using Telerik.WinControls.UI; 
 
namespace RadComboTest 
    public partial class Form1 : Form 
    { 
        public Form1() 
        { 
            InitializeComponent(); 
 
            radComboBox1.Items.Add(new RadComboBoxItem("Item1", 1)); 
            radComboBox1.Items.Add(new RadComboBoxItem("Item2", 2)); 
            radComboBox1.Items.Add(new RadComboBoxItem("Item3", 3)); 
 
            radComboBox1.SelectedValueChanged += new EventHandler(radComboBox1_SelectedValueChanged); 
        } 
 
        void radComboBox1_SelectedValueChanged(object sender, EventArgs e) 
        { 
            Debug.Fail("radComboBox1_SelectedValueChanged"); 
        } 
    } 
 

Can anybody confirm this issue?

Regards,
ReneMT


5 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 04 Feb 2009, 05:54 PM
Hello renemt,

Thank you for the providing your code.

I managed to reproduce the issue. It will be addressed in one of our next releases. For the time being you can use SelectedIndexChanged instead SelectedValueChanged.

I have updated your Telerik points for the report. Do not hesitate to contact me again if you have other questions.

Sincerely yours,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Fabien
Top achievements
Rank 2
answered on 21 Apr 2009, 07:08 AM
deleted, I made a mistake, sorry
0
gmendez
Top achievements
Rank 1
answered on 30 Jun 2009, 12:00 AM
Hello,

Will this issue be fixed for Q2?
Best regards,

Gonzalo
0
Martin Vasilev
Telerik team
answered on 02 Jul 2009, 07:00 PM
Hello gmendez,

Thank you for the question.

Unfortunately, we did not manage to address this issue in Q2 2009 release, which is already available for download. There were a lot of hard tasks with higher priority, as described in the Roadmap.

Do not hesitate to contact me again if you have other questions

Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
gmendez
Top achievements
Rank 1
answered on 02 Jul 2009, 07:30 PM
just asking :)
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
renemt
Top achievements
Rank 2
Answers by
Martin Vasilev
Telerik team
Fabien
Top achievements
Rank 2
gmendez
Top achievements
Rank 1
Share this question
or