Hi.
I have some bug with SelectedItem binding in 2016.1.216 version - value of bound object is not changing, when SelectedIndex changed. Initial value is displayed correctly.
Here is simple example.
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
.components =
new
System.ComponentModel.Container();
Telerik.WinControls.UI.RadListDataItem radListDataItem1 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem2 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem3 =
new
Telerik.WinControls.UI.RadListDataItem();
this
.radSpinEditor1 =
new
Telerik.WinControls.UI.RadSpinEditor();
this
.radLabel1 =
new
Telerik.WinControls.UI.RadLabel();
this
.radLabel2 =
new
Telerik.WinControls.UI.RadLabel();
this
.radDropDownList1 =
new
Telerik.WinControls.UI.RadDropDownList();
this
.radButton1 =
new
Telerik.WinControls.UI.RadButton();
this
.bindingSource =
new
System.Windows.Forms.BindingSource(
this
.components);
((System.ComponentModel.ISupportInitialize)(
this
.radSpinEditor1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.radLabel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.radLabel2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.radDropDownList1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.radButton1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
.bindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(
this
)).BeginInit();
this
.SuspendLayout();
//
// radSpinEditor1
//
this
.radSpinEditor1.DataBindings.Add(
new
System.Windows.Forms.Binding(
"Value"
,
this
.bindingSource,
"Id"
,
true
));
this
.radSpinEditor1.Location =
new
System.Drawing.Point(63, 13);
this
.radSpinEditor1.Name =
"radSpinEditor1"
;
this
.radSpinEditor1.Size =
new
System.Drawing.Size(100, 20);
this
.radSpinEditor1.TabIndex = 0;
this
.radSpinEditor1.TabStop =
false
;
//
// radLabel1
//
this
.radLabel1.Location =
new
System.Drawing.Point(12, 14);
this
.radLabel1.Name =
"radLabel1"
;
this
.radLabel1.Size =
new
System.Drawing.Size(16, 18);
this
.radLabel1.TabIndex = 1;
this
.radLabel1.Text =
"Id"
;
//
// radLabel2
//
this
.radLabel2.Location =
new
System.Drawing.Point(12, 54);
this
.radLabel2.Name =
"radLabel2"
;
this
.radLabel2.Size =
new
System.Drawing.Size(32, 18);
this
.radLabel2.TabIndex = 2;
this
.radLabel2.Text =
"State"
;
//
// radDropDownList1
//
this
.radDropDownList1.DataBindings.Add(
new
System.Windows.Forms.Binding(
"SelectedIndex"
,
this
.bindingSource,
"State"
,
true
));
this
.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
radListDataItem1.Text =
"Work"
;
radListDataItem2.Text =
"Idle"
;
radListDataItem3.Text =
"Maintenance"
;
this
.radDropDownList1.Items.Add(radListDataItem1);
this
.radDropDownList1.Items.Add(radListDataItem2);
this
.radDropDownList1.Items.Add(radListDataItem3);
this
.radDropDownList1.Location =
new
System.Drawing.Point(63, 52);
this
.radDropDownList1.Name =
"radDropDownList1"
;
this
.radDropDownList1.Size =
new
System.Drawing.Size(125, 20);
this
.radDropDownList1.TabIndex = 3;
//
// radButton1
//
this
.radButton1.Location =
new
System.Drawing.Point(170, 114);
this
.radButton1.Name =
"radButton1"
;
this
.radButton1.Size =
new
System.Drawing.Size(110, 24);
this
.radButton1.TabIndex = 4;
this
.radButton1.Text =
"Save"
;
this
.radButton1.Click +=
new
System.EventHandler(
this
.radButton1_Click);
//
// bindingSource
//
this
.bindingSource.DataSource =
typeof
(DropDownListBinding.Entity);
//
// Form1
//
this
.AutoScaleDimensions =
new
System.Drawing.SizeF(6F, 13F);
this
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this
.ClientSize =
new
System.Drawing.Size(292, 144);
this
.Controls.Add(
this
.radButton1);
this
.Controls.Add(
this
.radDropDownList1);
this
.Controls.Add(
this
.radLabel2);
this
.Controls.Add(
this
.radLabel1);
this
.Controls.Add(
this
.radSpinEditor1);
this
.Name =
"Form1"
;
//
//
//
this
.RootElement.ApplyShapeToControl =
true
;
this
.Text =
"Form1"
;
((System.ComponentModel.ISupportInitialize)(
this
.radSpinEditor1)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.radLabel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.radLabel2)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.radDropDownList1)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.radButton1)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
.bindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(
this
)).EndInit();
this
.ResumeLayout(
false
);
this
.PerformLayout();
}
#endregion
private
Telerik.WinControls.UI.RadSpinEditor radSpinEditor1;
private
Telerik.WinControls.UI.RadLabel radLabel1;
private
System.Windows.Forms.BindingSource bindingSource;
private
Telerik.WinControls.UI.RadLabel radLabel2;
private
Telerik.WinControls.UI.RadDropDownList radDropDownList1;
private
Telerik.WinControls.UI.RadButton radButton1;
}