ListBox Add Item as object (not RadItem)

2 posts, 0 answers
  1. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 04 Dec 2009 Link to this post

    the built-in windows forms listbox allows you to add items as objects, however the radlistbox forces you to add a listboxitem. why is that?

    this is especially confusing because the SelectedItem property returns an object and NOT a RadItem.

    I want to be able to add an object like I do for a regular listbox. can this be done?
  2. Victor
    Victor avatar
    1349 posts

    Posted 08 Dec 2009 Link to this post

    Hi Josh,

    Thank you for writing. I agree that this is not consistent with the standard WinForms model but I am afraid that this is a legacy API that we have to support in order not to break any existing application. System.Object can not be directly added as an item to the RadListBox and you will have to create a RadListBoxItems and decorate them with the necessary data manually or use data binding. Please write again if you have other questions.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top