Telerik.WinControls.UI.RadComboBoxItem depricated

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Jul 2013

    Posted 26 Jul 2013 Link to this post

    Hi,
    I'm currently upgrading a solution from telerik controls from 2010 to telerik controls from 2013. 
    In our solution we have a class inheriting from RadComboBoxItem.
    This control appears to have been deprecated. What control can I inherit from in telerik 2013 to achieve the same behaviour? Thanks.
    Dave
  2. George
    Admin
    George avatar
    500 posts

    Posted 30 Jul 2013 Link to this post

    Hello David,

    Thank you for writing.

    You need to inherit from RadDropDownListElement and RadDropDownList. A simple implementation would look like this:
    public class RadCustomDropDownList : RadDropDownList
    {
        protected override RadDropDownListElement CreateDropDownListElement()
        {
            return new RadCustomDropDownItem();
        }
     
        public override string ThemeClassName
        {
            get { return typeof(RadDropDownList).FullName; }
            set { }
        }
    }
     
    public class RadCustomDropDownItem : RadDropDownListElement
    {
        public RadCustomDropDownItem()
            : base()
        {
        }
     
        public RadCustomDropDownItem(object owner)
            :base(owner)
        {
        }
     
        public RadCustomDropDownItem(string text)
            : this()
        {
            this.Text = text;
        }
     
        public RadCustomDropDownItem(string text, string tag)
            : this(text)
        {
            this.Tag = tag;
        }
     
        protected override Type ThemeEffectiveType
        {
            get { return typeof(RadDropDownListElement); }
        }
    }

    Additionally you can find a more advanced implementation in our Code Library on this address.

    I hope this helps.

    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top