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

Telerik.WinControls.UI.RadComboBoxItem depricated

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 26 Jul 2013, 09:14 AM
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

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 30 Jul 2013, 03:52 PM
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 >>
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or