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

Adding a new RadGridView

3 Answers 191 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Curtis
Top achievements
Rank 2
Curtis asked on 04 Feb 2011, 04:10 PM
I'm having problems when I try to create a new RadGridView.  From the toolbox, I select RadGridView and then draw a box on the form.  When I do this it adds a reference to the control at the buttom, however it's not actually putting the control on the screen.  I checked to make sure that it was visible and the back color was different.  This problem has only started happening to me today, before today I could successfully add a RadGridView to my forms. 

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 04 Feb 2011, 05:20 PM
Hello,

I haven't come across this issue before. Please can you try it in a new project and let me know if it does the same there. If it doesn't, then I would suggest re-starting Visual Studio.
Let me know how you get on though
Richard
0
Curtis
Top achievements
Rank 2
answered on 07 Feb 2011, 10:51 PM

I opened a new project and the problem does not occur there. If I just create a new form in the current project it contiues to happen.  Also since my last post, when I open my project now I get the followings errors:

To prevent possible data loss before loading the designer, the following errors must be resolved:

(2) Could not load file or assembly 'TelerikCommon, Version=2010.3.10.1109, Culture=neutral, PublicKeyToken=5bb2a467cbec794e' or one of its dependencies. The system cannot find the file specified.

 
Instances of this error (2)
1.
at Telerik.WinControls.RadControl.Construct()
at Telerik.WinControls.RadControl..ctor()
at Telerik.WinControls.UI.RadGridView..ctor()
2.
at Telerik.WinControls.UI.RadContextMenu..ctor(IContainer owner)
at Telerik.WinControls.UI.RadContextMenu..ctor()

(1) The variable 'OrdAdjustmentRadGridView' is either undeclared or was never assigned.
 
Instances of this error (1)
1.
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Here is part of the code that corresponds to the second error...
Private Sub InitializeComponent()
       Me.components = New System.ComponentModel.Container
       Me.OrderAdjustmentResultsGroupControl = New DevExpress.XtraEditors.GroupControl
       Me.OrdAdjustmentRadGridView = New Telerik.WinControls.UI.RadGridView
       Me.DetailsButton = New DevExpress.XtraEditors.SimpleButton
       Me.SaveButton = New DevExpress.XtraEditors.SimpleButton
       Me.CloseButton = New DevExpress.XtraEditors.SimpleButton
       Me.DefaultLookAndFeel1 = New DevExpress.LookAndFeel.DefaultLookAndFeel(Me.components)
       Me.ResultsRadContextMenu = New Telerik.WinControls.UI.RadContextMenu(Me.components)
       Me.RadThemeManager1 = New Telerik.WinControls.RadThemeManager
       CType(Me.OrderAdjustmentResultsGroupControl, System.ComponentModel.ISupportInitialize).BeginInit()
       Me.OrderAdjustmentResultsGroupControl.SuspendLayout()
       CType(Me.OrdAdjustmentRadGridView, System.ComponentModel.ISupportInitialize).BeginInit()
       CType(Me.OrdAdjustmentRadGridView.MasterTemplate, System.ComponentModel.ISupportInitialize).BeginInit()
       Me.SuspendLayout()
       '
       'OrderAdjustmentResultsGroupControl
       '
       Me.OrderAdjustmentResultsGroupControl.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                   Or System.Windows.Forms.AnchorStyles.Left) _
                   Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
       Me.OrderAdjustmentResultsGroupControl.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(227, Byte), Integer), CType(CType(241, Byte), Integer), CType(CType(254, Byte), Integer))
       Me.OrderAdjustmentResultsGroupControl.Appearance.BackColor2 = System.Drawing.Color.White
       Me.OrderAdjustmentResultsGroupControl.Appearance.BorderColor = System.Drawing.Color.White
       Me.OrderAdjustmentResultsGroupControl.Appearance.ForeColor = System.Drawing.Color.Black
       Me.OrderAdjustmentResultsGroupControl.Appearance.Options.UseBackColor = True
       Me.OrderAdjustmentResultsGroupControl.Appearance.Options.UseBorderColor = True
       Me.OrderAdjustmentResultsGroupControl.Appearance.Options.UseForeColor = True
       Me.OrderAdjustmentResultsGroupControl.AppearanceCaption.BackColor = System.Drawing.Color.White
       Me.OrderAdjustmentResultsGroupControl.AppearanceCaption.Options.UseBackColor = True
       Me.OrderAdjustmentResultsGroupControl.Controls.Add(Me.OrdAdjustmentRadGridView)
       Me.OrderAdjustmentResultsGroupControl.Controls.Add(Me.DetailsButton)
       Me.OrderAdjustmentResultsGroupControl.Location = New System.Drawing.Point(13, 12)
       Me.OrderAdjustmentResultsGroupControl.Name = "OrderAdjustmentResultsGroupControl"
       Me.OrderAdjustmentResultsGroupControl.Size = New System.Drawing.Size(1039, 467)
       Me.OrderAdjustmentResultsGroupControl.TabIndex = 7
       Me.OrderAdjustmentResultsGroupControl.Text = "Results"


If I exclude the form that contains the gridview from my project all the errors go away.  

Thanks for your help. 
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 08 Feb 2011, 12:36 AM
Hello,

What version of the controls are you actually using? I suspect what has happened is that you have upgraded to a newer version, but your project is still using the old version of the assemblies which is why you are getting this error. I'd suggest removing and re-adding the references to the Telerik assemblies or running it through the Telerik Project Upgrade Utility

Hope that helps but let me know if you have further issues
Richard
Tags
GridView
Asked by
Curtis
Top achievements
Rank 2
Answers by
Richard Slade
Top achievements
Rank 2
Curtis
Top achievements
Rank 2
Share this question
or