RootRadElement cannot be converted to type 'System.Windows.Forms.Control'

2 posts, 0 answers
  1. francesco
    francesco avatar
    8 posts
    Member since:
    Sep 2008

    Posted 11 Feb 2009 Link to this post

    Hi,
       i'm using Visual Studio 2008 with SP1 and Telerik Controls fro WinForms Q3 2008 SP2 and i have problems with the Element Hierarchy editor on a form: on every RADControl i chose to 'Edit UI elements' the Editor window appears, but when i move from root node to another node the window disappear and Visual Studio starts to show the message in object (RootRadElement cannot be converted to type 'System.Windows.Forms.Control') and i must restart the IDE. Any suggestion to resolve this problem? i cannot work in this manner....

    This is the .Designer.cs files generated from VS

    1 partial class frmGenerazioneEsplosi {  
    2         /// <summary>  
    3         /// Required designer variable.  
    4         /// </summary>  
    5         private System.ComponentModel.IContainer components = null;  
    6  
    7         /// <summary>  
    8         /// Clean up any resources being used.  
    9         /// </summary>  
    10         /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>  
    11         protected override void Dispose(bool disposing) {  
    12             if (disposing && (components != null)) {  
    13                 components.Dispose();  
    14             }  
    15             base.Dispose(disposing);  
    16         }
    17
    18         #region Windows Form Designer generated code  
    19  
    20         /// <summary>  
    21         /// Required method for Designer support - do not modify  
    22         /// the contents of this method with the code editor.  
    23         /// </summary>  
    24         private void InitializeComponent() {  
    25             this.components = new System.ComponentModel.Container();  
    26             this.rgvEsplosi = new Telerik.WinControls.UI.RadGridView();  
    27             this.rlbRicambi = new Telerik.WinControls.UI.RadListBox();  
    28             this.telerikTheme1 = new Telerik.WinControls.Themes.TelerikTheme();  
    29             this.rtsGenerazioneEsplosi = new Telerik.WinControls.UI.RadToolStrip();  
    30             this.radToolStripElement1 = new Telerik.WinControls.UI.RadToolStripElement();  
    31             this.radToolStripItem1 = new Telerik.WinControls.UI.RadToolStripItem();  
    32             this.cmdDelete = new Telerik.WinControls.UI.RadImageButtonElement();  
    33             this.cmdLock = new Telerik.WinControls.UI.RadImageButtonElement();  
    34             this.cmdUnlock = new Telerik.WinControls.UI.RadImageButtonElement();  
    35             this.rcmRicambi = new Telerik.WinControls.UI.RadContextMenu();  
    36             this.rmiAssociaRicambio = new Telerik.WinControls.UI.RadMenuItem();  
    37             this.radContextMenuManager1 = new Telerik.WinControls.UI.RadContextMenuManager();  
    38             this.tabapprBindingSource = new System.Windows.Forms.BindingSource(this.components);  
    39             this.dsBus = new RicambiDotNet.dsBus();  
    40             this.tabapprTableAdapter = new RicambiDotNet.dsBusTableAdapters.tabapprTableAdapter();  
    41             ((System.ComponentModel.ISupportInitialize)(this.rgvEsplosi)).BeginInit();  
    42             ((System.ComponentModel.ISupportInitialize)(this.rgvEsplosi.MasterGridViewTemplate)).BeginInit();  
    43             ((System.ComponentModel.ISupportInitialize)(this.rlbRicambi)).BeginInit();  
    44             ((System.ComponentModel.ISupportInitialize)(this.rtsGenerazioneEsplosi)).BeginInit();  
    45             ((System.ComponentModel.ISupportInitialize)(this.tabapprBindingSource)).BeginInit();  
    46             ((System.ComponentModel.ISupportInitialize)(this.dsBus)).BeginInit();  
    47             this.SuspendLayout();  
    48             //   
    49             // rgvEsplosi  
    50             //   
    51             this.rgvEsplosi.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)  
    52                                     | System.Windows.Forms.AnchorStyles.Left)  
    53                                     | System.Windows.Forms.AnchorStyles.Right)));  
    54             this.rgvEsplosi.AutoScroll = true;  
    55             this.rgvEsplosi.BackColor = System.Drawing.SystemColors.Control;  
    56             this.rgvEsplosi.Cursor = System.Windows.Forms.Cursors.Arrow;  
    57             this.rgvEsplosi.EnableAlternatingRowColor = true;  
    58             this.rgvEsplosi.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);  
    59             this.rgvEsplosi.ForeColor = System.Drawing.SystemColors.ControlText;  
    60             this.rgvEsplosi.ImeMode = System.Windows.Forms.ImeMode.NoControl;  
    61             this.rgvEsplosi.Location = new System.Drawing.Point(12, 38);  
    62             //   
    63             //   
    64             //   
    65             this.rgvEsplosi.MasterGridViewTemplate.AllowAddNewRow = false;  
    66             this.rgvEsplosi.MasterGridViewTemplate.AllowCellContextMenu = false;  
    67             this.rgvEsplosi.MasterGridViewTemplate.AllowColumnChooser = false;  
    68             this.rgvEsplosi.MasterGridViewTemplate.AllowColumnHeaderContextMenu = false;  
    69             this.rgvEsplosi.MasterGridViewTemplate.AllowColumnReorder = false;  
    70             this.rgvEsplosi.MasterGridViewTemplate.AllowDragToGroup = false;  
    71             this.rgvEsplosi.MasterGridViewTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;  
    72             this.rgvEsplosi.MasterGridViewTemplate.EnableFiltering = true;  
    73             this.rgvEsplosi.MasterGridViewTemplate.EnableGrouping = false;  
    74             this.rgvEsplosi.MultiSelect = true;  
    75             this.rgvEsplosi.Name = "rgvEsplosi";  
    76             this.rgvEsplosi.ReadOnly = true;  
    77             this.rgvEsplosi.RightToLeft = System.Windows.Forms.RightToLeft.No;  
    78             this.rgvEsplosi.ShowGroupPanel = false;  
    79             this.rgvEsplosi.Size = new System.Drawing.Size(552, 363);  
    80             this.rgvEsplosi.TabIndex = 0;  
    81             this.rgvEsplosi.Text = "radGridViewPreview";  
    82             this.rgvEsplosi.ThemeName = "Telerik";  
    83             this.rgvEsplosi.CellFormatting += new Telerik.WinControls.UI.CellFormattingEventHandler(this.rgvEsplosi_CellFormatting);  
    84             this.rgvEsplosi.SelectionChanged += new System.EventHandler(this.rgvEsplosi_SelectionChanged);  
    85             ((Telerik.WinControls.UI.GridTableElement)(this.rgvEsplosi.GetChildAt(0))).Text = "No Data to display";  
    86             ((Telerik.WinControls.UI.GridTableElement)(this.rgvEsplosi.GetChildAt(0))).TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;  
    87             //   
    88             // rlbRicambi  
    89             //   
    90             this.rlbRicambi.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)  
    91                                     | System.Windows.Forms.AnchorStyles.Right)));  
    92             this.rlbRicambi.Location = new System.Drawing.Point(570, 62);  
    93             this.rlbRicambi.Name = "rlbRicambi";  
    94             this.rlbRicambi.Size = new System.Drawing.Size(181, 231);  
    95             this.rlbRicambi.TabIndex = 1;  
    96             this.rlbRicambi.ThemeName = "Telerik";  
    97             //   
    98             // rtsGenerazioneEsplosi  
    99             //   
    100             this.rtsGenerazioneEsplosi.AllowDragging = false;  
    101             this.rtsGenerazioneEsplosi.AllowFloating = false;  
    102             this.rtsGenerazioneEsplosi.Dock = System.Windows.Forms.DockStyle.Top;  
    103             this.rtsGenerazioneEsplosi.Items.AddRange(new Telerik.WinControls.RadItem[] {  
    104             this.radToolStripElement1});  
    105             this.rtsGenerazioneEsplosi.Location = new System.Drawing.Point(0, 0);  
    106             this.rtsGenerazioneEsplosi.MinimumSize = new System.Drawing.Size(5, 5);  
    107             this.rtsGenerazioneEsplosi.Name = "rtsGenerazioneEsplosi";  
    108             this.rtsGenerazioneEsplosi.Orientation = System.Windows.Forms.Orientation.Horizontal;  
    109             //   
    110             //   
    111             //   
    112             this.rtsGenerazioneEsplosi.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;  
    113             this.rtsGenerazioneEsplosi.RootElement.MinSize = new System.Drawing.Size(5, 5);  
    114             this.rtsGenerazioneEsplosi.ShowOverFlowButton = false;  
    115             this.rtsGenerazioneEsplosi.Size = new System.Drawing.Size(756, 26);  
    116             this.rtsGenerazioneEsplosi.TabIndex = 3;  
    117             this.rtsGenerazioneEsplosi.Text = "radToolStrip1";  
    118             this.rtsGenerazioneEsplosi.ThemeName = "Telerik";  
    119             ((Telerik.WinControls.Layouts.StripLayoutPanel)(this.rtsGenerazioneEsplosi.GetChildAt(0).GetChildAt(1))).ShouldPaint = true;  
    120             //   
    121             // radToolStripElement1  
    122             //   
    123             this.radToolStripElement1.Items.AddRange(new Telerik.WinControls.RadItem[] {  
    124             this.radToolStripItem1});  
    125             this.radToolStripElement1.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);  
    126             this.radToolStripElement1.MinSize = new System.Drawing.Size(0, 21);  
    127             this.radToolStripElement1.Name = "radToolStripElement1";  
    128             this.radToolStripElement1.Text = "radToolStripElement1";  
    129             //   
    130             // radToolStripItem1  
    131             //   
    132             this.radToolStripItem1.Class = "ToolStripItem";  
    133             this.radToolStripItem1.Items.AddRange(new Telerik.WinControls.RadItem[] {  
    134             this.cmdDelete,  
    135             this.cmdLock,  
    136             this.cmdUnlock});  
    137             this.radToolStripItem1.Key = "0";  
    138             this.radToolStripItem1.MinSize = new System.Drawing.Size(25, 21);  
    139             this.radToolStripItem1.Name = "radToolStripItem1";  
    140             this.radToolStripItem1.Text = "radToolStripItem1";  
    141             //   
    142             // cmdDelete  
    143             //   
    144             this.cmdDelete.Alignment = System.Drawing.ContentAlignment.MiddleLeft;  
    145             this.cmdDelete.CanFocus = true;  
    146             this.cmdDelete.Image = global::RicambiDotNet.Properties.Resources.imgDelete;  
    147             this.cmdDelete.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;  
    148             this.cmdDelete.Name = "cmdDelete";  
    149             this.cmdDelete.Text = "radImageButtonElement3";  
    150             this.cmdDelete.ToolTipText = "Elimina esploso";  
    151             //   
    152             // cmdLock  
    153             //   
    154             this.cmdLock.Alignment = System.Drawing.ContentAlignment.MiddleLeft;  
    155             this.cmdLock.CanFocus = true;  
    156             this.cmdLock.Image = global::RicambiDotNet.Properties.Resources.imgLock;  
    157             this.cmdLock.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;  
    158             this.cmdLock.Name = "cmdLock";  
    159             this.cmdLock.Text = "radImageButtonElement1";  
    160             //   
    161             // cmdUnlock  
    162             //   
    163             this.cmdUnlock.Alignment = System.Drawing.ContentAlignment.MiddleLeft;  
    164             this.cmdUnlock.CanFocus = true;  
    165             this.cmdUnlock.Image = global::RicambiDotNet.Properties.Resources.imgUnlock;  
    166             this.cmdUnlock.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;  
    167             this.cmdUnlock.Name = "cmdUnlock";  
    168             this.cmdUnlock.Text = "radImageButtonElement1";  
    169             //   
    170             // rcmRicambi  
    171             //   
    172             this.rcmRicambi.Items.AddRange(new Telerik.WinControls.RadItem[] {  
    173             this.rmiAssociaRicambio});  
    174             //   
    175             // rmiAssociaRicambio  
    176             //   
    177             this.rmiAssociaRicambio.Name = "rmiAssociaRicambio";  
    178             this.rmiAssociaRicambio.Text = "Associa ricambio";  
    179             //   
    180             // tabapprBindingSource  
    181             //   
    182             this.tabapprBindingSource.DataMember = "tabappr";  
    183             this.tabapprBindingSource.DataSource = this.dsBus;  
    184             //   
    185             // dsBus  
    186             //   
    187             this.dsBus.DataSetName = "dsBus";  
    188             this.dsBus.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;  
    189             //   
    190             // tabapprTableAdapter  
    191             //   
    192             this.tabapprTableAdapter.ClearBeforeFill = true;  
    193             //   
    194             // frmGenerazioneEsplosi  
    195             //   
    196             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);  
    197             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;  
    198             this.ClientSize = new System.Drawing.Size(756, 427);  
    199             this.Controls.Add(this.rtsGenerazioneEsplosi);  
    200             this.Controls.Add(this.rlbRicambi);  
    201             this.Controls.Add(this.rgvEsplosi);  
    202             this.MaximizeBox = false;  
    203             this.MinimizeBox = false;  
    204             this.Name = "frmGenerazioneEsplosi";  
    205             this.Text = "frmWizardGenerazioneEsplosi";  
    206             this.Load += new System.EventHandler(this.frmGenerazioneEsplosi_Load);  
    207             ((System.ComponentModel.ISupportInitialize)(this.rgvEsplosi.MasterGridViewTemplate)).EndInit();  
    208             ((System.ComponentModel.ISupportInitialize)(this.rgvEsplosi)).EndInit();  
    209             ((System.ComponentModel.ISupportInitialize)(this.rlbRicambi)).EndInit();  
    210             ((System.ComponentModel.ISupportInitialize)(this.rtsGenerazioneEsplosi)).EndInit();  
    211             ((System.ComponentModel.ISupportInitialize)(this.tabapprBindingSource)).EndInit();  
    212             ((System.ComponentModel.ISupportInitialize)(this.dsBus)).EndInit();  
    213             this.ResumeLayout(false);  
    214             this.PerformLayout();  
    215  
    216         }
    217
    218         #endregion  
    219  
    220         private Telerik.WinControls.UI.RadGridView rgvEsplosi;  
    221         private dsBus dsBus;  
    222         private System.Windows.Forms.BindingSource tabapprBindingSource;  
    223         private RicambiDotNet.dsBusTableAdapters.tabapprTableAdapter tabapprTableAdapter;  
    224         private Telerik.WinControls.UI.RadListBox rlbRicambi;  
    225         private Telerik.WinControls.Themes.TelerikTheme telerikTheme1;  
    226         private Telerik.WinControls.UI.RadToolStrip rtsGenerazioneEsplosi;  
    227         private Telerik.WinControls.UI.RadToolStripElement radToolStripElement1;  
    228         private Telerik.WinControls.UI.RadToolStripItem radToolStripItem1;  
    229         private Telerik.WinControls.UI.RadImageButtonElement cmdDelete;  
    230         private Telerik.WinControls.UI.RadImageButtonElement cmdLock;  
    231         private Telerik.WinControls.UI.RadImageButtonElement cmdUnlock;  
    232         private Telerik.WinControls.UI.RadContextMenu rcmRicambi;  
    233         private Telerik.WinControls.UI.RadContextMenuManager radContextMenuManager1;  
    234         private Telerik.WinControls.UI.RadMenuItem rmiAssociaRicambio;  
    235     } 


    Thanks for any suggestions
       Francesco
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 12 Feb 2009 Link to this post

    Hi francesco,

    Thank you for your feedback. We managed to reproduce the problem and I have updated your Telerik points for the report.

    We will need more time to research the reason for the crashing of the UI Editor, however deleting the context menu components below the form seems to fix the issue.
     

    Kind regards,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top