Windows Develop Bookmark and Share   
 index > Windows Forms Designer > IDE Error on Data Repeater Control MSDN demo code project?
 

IDE Error on Data Repeater Control MSDN demo code project?

I have watched the videoand downloaded the MSDN codeon the repeater control from here.

http://msdn.microsoft.com/en-us/vbasic/cc411420.aspx

How is this resolved?

But whenI load the project code I get an IDE error that says:

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

The designer cannot process the code at line 62: Me.DataRepeater1.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) The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.



Instances of this error (1)
1.
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.CreateQuoteExpression(XmlElementData xmlElement)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.XmlElementData.get_CodeDomElement()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.EndElement(String prefix, String name, String urn)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.Parse(XmlReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

Thanks!
msny  Thursday, May 21, 2009 1:20 PM
Hi msny,

Would you please download the changed project from here ? I've made it work on my side. Please make sure the corresponding version of Visual Basic PowerPack is installed on your machine.

If that doesn't work on your side, please feel free to post back.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer bymsny Wednesday, May 27, 2009 12:14 PM
  •  
Bruce.Zhou  Wednesday, May 27, 2009 7:15 AM
Hi msny,

I can see the problem. As the error indicates, we can put the code in line62 after the InitializeComponent in the constructor to solve this problem.

Actually, based on my test, I cut off the code in line 62, and build the project, after then I paste the code still in line 62, and rebuild the project. This can also solve the problem. But I am not sure if it's solved by accident. So I still suggest you try the first solution.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Monday, May 25, 2009 6:23 AM

I'm confused, moving line 62 does not change the error, no matter where I put it.
Here is all the code block for your to see.
The datarepeater line of code shows up underlined, as not defined. Yet if I create a new
repeater on another form its fine.
What do you suggest?

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.DataRepeater1 = New Microsoft.VisualBasic.PowerPacks.DataRepeater <<<shows as undefined!
Me.components = New System.ComponentModel.Container
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
Dim LastNameLabel As System.Windows.Forms.Label
Dim FirstNameLabel As System.Windows.Forms.Label
Dim NotesLabel As System.Windows.Forms.Label
Me.EmployeesDataSet = New UsingDataRepeaterControl.EmployeesDataSet
Me.EmployeesBindingSource = New System.Windows.Forms.BindingSource(Me.components)
Me.EmployeesTableAdapter = New UsingDataRepeaterControl.EmployeesDataSetTableAdapters.EmployeesTableAdapter
Me.TableAdapterManager = New UsingDataRepeaterControl.EmployeesDataSetTableAdapters.TableAdapterManager
Me.EmployeesBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components)
Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton
Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton
Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator
Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox
Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel
Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator
Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton
Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton
Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator
Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton
Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton
Me.EmployeesBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton
Me.PhotoPictureBox = New System.Windows.Forms.PictureBox
Me.LastNameTextBox = New System.Windows.Forms.TextBox
Me.FirstNameTextBox = New System.Windows.Forms.TextBox
Me.NotesTextBox = New System.Windows.Forms.TextBox
LastNameLabel = New System.Windows.Forms.Label
FirstNameLabel = New System.Windows.Forms.Label
NotesLabel = New System.Windows.Forms.Label
Me.DataRepeater1.ItemTemplate.SuspendLayout()
Me.DataRepeater1.SuspendLayout()
CType(Me.EmployeesDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmployeesBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmployeesBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit()
Me.EmployeesBindingNavigator.SuspendLayout()
CType(Me.PhotoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'DataRepeater1
'
Me.DataRepeater1.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)
'
'DataRepeater1.ItemTemplate
'
Me.DataRepeater1.ItemTemplate.Controls.Add(NotesLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.NotesTextBox)
Me.DataRepeater1.ItemTemplate.Controls.Add(FirstNameLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.FirstNameTextBox)
Me.DataRepeater1.ItemTemplate.Controls.Add(LastNameLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.LastNameTextBox)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.PhotoPictureBox)
Me.DataRepeater1.ItemTemplate.Size = New System.Drawing.Size(456, 146)
Me.DataRepeater1.Location = New System.Drawing.Point(13, 44)
Me.DataRepeater1.Name = "DataRepeater1"
Me.DataRepeater1.Size = New System.Drawing.Size(464, 408)
Me.DataRepeater1.TabIndex = 0
Me.DataRepeater1.Text = "DataRepeater1"
'

  • Edited bymsny Tuesday, May 26, 2009 2:38 PM
  •  
msny  Tuesday, May 26, 2009 2:35 PM
Hi msny,

Would you please download the changed project from here ? I've made it work on my side. Please make sure the corresponding version of Visual Basic PowerPack is installed on your machine.

If that doesn't work on your side, please feel free to post back.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer bymsny Wednesday, May 27, 2009 12:14 PM
  •  
Bruce.Zhou  Wednesday, May 27, 2009 7:15 AM
Hi msny,

Would you please download the changed project from here ? I've made it work on my side. Please make sure the corresponding version of Visual Basic PowerPack is installed on your machine.

If that doesn't work on your side, please feel free to post back.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.

Bruce-

Many thanks to you!
Thatdownload of the project didit.

I rebuilt it against my northwind db and it works nicely.
Not sure why the orginial Beth Massi download didnt work for
me?
msny  Wednesday, May 27, 2009 12:14 PM

You can use google to search for other answers

Custom Search

More Threads

• Progress Bar Problem
• DropDownWidth of ComboBox
• Designer Keeps Resizing Controls On Build
• Called Forms referencing calling Forms controls
• Error at design time in visual studio 2002 and not in visual studio 2003
• RightToLeft Property in controls
• Problems w/ standard windows forms controls when add custom control
• Runtime resize handles
• Host Designer
• Dynamic control bars