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

RadListBoxItemCollection error

1 Answer 46 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 31 May 2013, 03:38 PM
I just uninstalled all my old telerik controls and installed the latest version of winforms 2013.1.321.0.

I working on a project that I haven't touched in a couple of years.  When I opened out the c# project I get many errors.

RadListBoxItem was giving me an error so I changed it to RadListDataItem and the error went away.  I haven't been able to view my forms because I have so many errors. 

This is the error i'm stuck on now and if anyone can help it would be greatly appreciated. 
This is my code previously

RadListBoxItemCollection itemsToMove = new RadListBoxItemCollection();

and I get this error:

Error    2    The type or namespace name 'RadListBoxItemCollection' could not be found (are you missing a using directive or an assembly reference?)   

I changed the code to
RadListDataItemCollection itemsToMove = new RadListDataItemCollection();

and this is the error i'm getting.

Error    2    'Telerik.WinControls.UI.RadListDataItemCollection' does not contain a constructor that takes '0' arguments   

Thank you



1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Jun 2013, 08:28 AM
Hi Jerry,

Thank you for writing.

You can just change this type of collection to a simple List<RadListDataItem> and you should be OK.

Additionally, here is a general recommendation for the upgrade process. In Q3 2011, we have removed all obsolete controls from our code base after they were marked as obsolete for more than one year. The release notes are available here: http://www.telerik.com/products/winforms/whats-new/release-history/q3-2011-version-2011-3-11-1116.aspx.

In general it is best to perform the upgrade in two stages. First, upgrade to Q3 2010 (if you are using version prior that) where all obsolete controls and their descendants exist. For most of the obsolete controls, we offer a Conversion Tool, which will help you with the conversion. This tool can be used for the following conversions:

RadTabStrip to RadPageView
RadPanelBar to RadPageView
RadComboBox to RadDropDownList
RadListBox to RadListControl

Additionally, If you have used the old implementation of our docking control (DockingManger), you will be able to convert it to the new implementation (RadDock) again from the  option in the old control Smart Tag.

The only obsolete control which you will manually convert is the RadToolStrip control. The reason for not providing a tool for conversion of this control is the fact that both controls are semantically different, so you will have to manually recreate the control by using RadCommandBar. From my experience, I can say that this is an easy conversion.

After you convert all your controls to their descendants and clean all errors and warnings, then you can perform an upgrade to the latest version.

I hope that you find this information helpful. If you have any questions, during the transition process, do not hesitate to contact us.
 

Regards,
Stefan
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
ListBox
Asked by
Jerry
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or