Problems with inherited form with control RadTabStrip

2 posts, 0 answers
  1. nomar2894
    nomar2894 avatar
    1 posts
    Member since:
    Aug 2007

    Posted 22 Aug 2007 Link to this post

    Hi,

    I have created the template form with the control RadTabStrip.  When the other form inherites from the template, I can’t add more TabItems in design time, because it fails. The errors are:

    Element already added!
    Hide    

    at Telerik.WinControls.RadElementCollection.CheckElementAlreadyAdded(Object value)
    at Telerik.WinControls.RadElementCollection.OnInsert(Int32 index, Object value)
    at System.Collections.CollectionBase.System.Collections.IList.Insert(Int32 index, Object value)
    at Telerik.WinControls.RadItemCollection.OnInsertComplete(Int32 index, Object value)
    at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
    at Telerik.WinControls.RadItemCollection.AddRange(RadItem[] value)

    But if i comment the line

    this.radTabStrip1.Items.AddRange(new Telerik.WinControls.RadItem[] {

    this.tabItem2});

    and change it for 

    this.radTabStrip1.Items.AddRange(new Telerik.WinControls.RadItem[] {

     

    new Telerik.WinControls.UI.TabItem()

    });

    there is no error. In run time it doesn´t  present this error.
  2. kdev
    kdev avatar
    16 posts
    Member since:
    Apr 2007

    Posted 23 Aug 2007 Link to this post

    Hi nomar2894,
    I have the same problem and here is the Telerik answer:
    "We are deeply sorry for this problem, KORT. Unfortunately, it relates to the way the VS2005 designer works, and we not sure how to overcome it.

    There are several issues that all 3rd party component vendors, including Telerik, experience with their controls when working in inherited form designers. Actually, even some of the toolbox controls do not behave as expected in this case (eg. DataGridView will appear disabled and it is not possible to alter any of its properties).

    It seems that the custom designers' behavior is somehow overridden in this case and we still haven't found any solution to this problem. We can only suggest a workaround by preparing a template form that you can copy in your project instead of inheriting it, especially if you use third party controls. Or you can inherit the form, but modify the collection properties (such as .Items) programmatically only, in the inherited form's initializer method.

    You are not the first to report this issue and it has been logged in our system for quite some time. I guess the only way to go would be to contact Microsoft and check where the problem comes from. We will do our best to keep you updated on this issue.
    Thank you in advance for your understanding.
    Kind regards,
    Mike
    the Telerik team "

    if some one have any alternative, please feel free to post a message
    Thanks
    Kort 
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top