Declined
Last Updated: 05 Aug 2016 09:27 by ADMIN
Duplicated: http://feedback.telerik.com/Project/154/Feedback/Details/138793-fix-raddataentry-incorrectly-mapped-value-for-the-first-item-when-using-raddro

How to reproduce:
 public partial class Form1 : Form
    {
        List<Product> productList;
        List<Supplier> suplierList;
        BindingSource productsBinding;

        public Form1()
        {
            InitializeComponent();

            radDataEntry1.EditorInitializing += radDataEntry1_EditorInitializing;
            radDataEntry1.BindingCreating += radDataEntry1_BindingCreating;
            radDataEntry1.BindingCreated += radDataEntry1_BindingCreated;

            productList = new List<Product>();
            suplierList = new List<Supplier>();

            //productList.Add(new Product(1, "Chai"));
            //productList.Add(new Product(2, "Chang"));
            //productList.Add(new Product(3, "Aniseed Syrup"));
            productList.Add(new Product(4, "Chef Anton's Gumbo Mix"));
            productList.Add(new Product(5, "Tofu"));
            productList.Add(new Product(null, "Sir Rodney's Marmalade"));
            productList.Add(new Product(6, "Boston Crab Meat"));
            productList.Add(new Product(5, "Chartreuse verte"));
            productList.Add(new Product(2, "Ravioli Angelo"));
            productList.Add(new Product(4, "Perth Pasties"));

            suplierList.Add(new Supplier(1, "Exotic Liquids"));
            suplierList.Add(new Supplier(2, "New Orleans Cajun Delights"));
            suplierList.Add(new Supplier(3, "Tokyo Traders"));
            suplierList.Add(new Supplier(4, "Norske Meierier"));
            suplierList.Add(new Supplier(5, "New England Seafood Cannery"));
            suplierList.Add(new Supplier(6, "Leka Trading"));


            productsBinding = new BindingSource();
            productsBinding.DataSource = productList;
            radBindingNavigator1.BindingSource = productsBinding;
            radDataEntry1.DataSource = productsBinding;
        }

        RadDropDownList radDropDownList1;
        void radDataEntry1_EditorInitializing(object sender, Telerik.WinControls.UI.EditorInitializingEventArgs e)
        {
            if (e.Property.Name == "SupplierID")
            {
                radDropDownList1 = new RadDropDownList();
                radDropDownList1.DataSource = suplierList;
                radDropDownList1.ValueMember = "SupplierID";
                radDropDownList1.DisplayMember = "CompanyName";

                e.Editor = radDropDownList1;
            }
        }

        void radDataEntry1_BindingCreating(object sender, Telerik.WinControls.UI.BindingCreatingEventArgs e)
        {
            if (e.DataMember == "SupplierID")
            {
                e.PropertyName = "SelectedValue";
            }
        }

        void radDataEntry1_BindingCreated(object sender, BindingCreatedEventArgs e)
        {
            if (e.DataMember == "SupplierID")
            {
                e.Binding.FormattingEnabled = true;
                e.Binding.Parse += new ConvertEventHandler(Binding_Parse);
            }
        }

        private void Binding_Parse(object sender, ConvertEventArgs e)
        {
            int tmpvalue;
            int? result = int.TryParse(e.Value.ToString(), out tmpvalue) ? tmpvalue : (int?)null;
            e.Value = result;
        }

        public class Product
        {
            private int? _supplierID;
            private string _productName;
            public Product(int? supplierID, string productName)
            {
                this._supplierID = supplierID;
                this._productName = productName;
            }

            public int? SupplierID
            {
                get
                {
                    return this._supplierID;
                }
                set
                {
                    this._supplierID = value;
                }
            }

            public string ProductName
            {
                get
                {
                    return this._productName;
                }
                set
                {
                    this._productName = value;
                }
            }

           
        }

        public partial class Supplier
        {
            private int? _supplierID;
            private string _companyName;
            public Supplier(int? supplierID, string companyName)
            {
                this._supplierID = supplierID;
                this._companyName = companyName;
            }
            public int? SupplierID
            {
                get
                {
                    return this._supplierID;
                }
                set
                {
                    this._supplierID = value;
                }
            }
            public string CompanyName
            {
                get
                {
                    return this._companyName;
                }
                set
                {
                    this._companyName = value;
                }
            }
        }
    }

Workaround: handle the Shown event of the form and manually sync the the selected item in the editor with a cached initial indexprotected override void OnShown(EventArgs e)
{
    base.OnShown(e);

    this.radDropDownList1.SelectedIndex = initialIndex - 1;
}

Declined
Last Updated: 05 Jun 2019 12:28 by ADMIN
To reproduce:
- Add bindingnavigator and data entry bound to a single binding source.
- Change one of the default editors to drop down list which is also bound to a datasource.
- Synchronize the selected value in the binding source CurrentChanged event.
- Press the move to the last item button.
- You will notice that the value is not displayed properly (displayed is the value member not the display member)

Workaround: 
void radBindingNavigator1MoveLastItem_Click(object sender, EventArgs e)
{
    bs.MovePrevious();
    bs.MoveNext();
}
Declined
Last Updated: 16 Feb 2015 12:07 by ADMIN
Hello,

If I place a control, for example a Button on the RadDataEntry control, it appearance changes every time, after I finish with a debug session.

- The image1.jpg shows the initial state. The designer is opened in Visual Studio.
- I click on Run (Debug) and I close the application.
- The Button appearance changes -> image2.jpg
- I click on Run (Debug) and I close the application.
- The Button appearance changes -> image3.jpg

The button is getting smaller at every turn.

Best Regards,
László