Completed
Last Updated: 11 May 2015 08:12 by ADMIN
ADMIN
Dimitar
Created on: 20 Apr 2015 14:14
Category:
Type: Bug Report
0
FIX. RadCheckedDropDownList - the item text is added to the text box when Tab is pressed and the AutoComplete drop down is shown.
To reproduce:
private BindingList<Model> dataSource = new BindingList<Model>();
private Random rnd = new Random();

public DataBinding1()
{
    InitializeComponent();

    this.radCheckedDropDownList1.CheckedMember = "Selected";
    this.radCheckedDropDownList1.DisplayMember = "Name";
    this.radCheckedDropDownList1.ValueMember = "Id";

    for (int i = 0; i < 15; i++)
    {
        dataSource.Add(new Model
        {
            Id = i,
            Name = "Item " + i
        });
    }
}

class Model : INotifyPropertyChanged
{
    private int id;
    private bool selected;
    private string name;

    public int Id
    {
        get { return this.id; }
        set { this.id = value; this.OnPropertyChanged("Id"); }
    }

    public bool Selected
    {
        get { return this.selected; }
        set { this.selected = value; this.OnPropertyChanged("Selected"); }
    }

    public string Name
    {
        get { return this.name; }
        set { this.name = value; this.OnPropertyChanged("Name"); }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void OnPropertyChanged(string propName)
    {
        if (this.PropertyChanged != null)
        {
            this.PropertyChanged(this, new PropertyChangedEventArgs(propName));
        }
    }
}
0 comments