473,378 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Child list for field owner-info cannot be created

My name is Norm, I changed something that caused this problem, and I do not
what it was. I also do not know how to debug this problem! The line where
the crash occures is marked by an *. The windows form will not display in the
designer.
Please help!!

//
// Animal
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(822, 554);
this.Controls.Add(this.label10);
this.Controls.Add(this.groupbox3);
this.Controls.Add(this.groupBox1);
* this.Font = new System.Drawing.Font("Times New Roman", 8.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Menu = this.mainMenu1;
this.Name = "Animal";
this.Text = "Animal Information";
this.Load += new System.EventHandler(this.Animal_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupbox3.ResumeLayout(false);
this.groupbox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.d sAnimal1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p ictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdShots)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdMedications)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p cAnimalPhoto)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
Nov 11 '06 #1
4 7356
Well, what does the error message say (in the IDE)???

And also: source control! show diffs...

The designer is notorious for being a bit sensitive.
Since it is just a font line, I would be inclined to just remove it
completely and see if it resolves itself after a rebuild. If so, just
change the font again from the designer and hope. If it doesn't help,
then I tend to cut chunks large chunks until I find what broke
(observing dependencies...) - a kind of manual binary search.

Also - note that the flakey designer can sometimes just get grumpy.
Close the IDE completely and reload your project. You'd be /amazed/ how
often this helps. It gets even flakier with data bindings [hence I
never trust the IDE to do them!]

;-p

Marc

Nov 11 '06 #2
What is the error message you are getting?

Mark
--
http://www.markdawson.org
"normb" wrote:
My name is Norm, I changed something that caused this problem, and I do not
what it was. I also do not know how to debug this problem! The line where
the crash occures is marked by an *. The windows form will not display in the
designer.
Please help!!

//
// Animal
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(822, 554);
this.Controls.Add(this.label10);
this.Controls.Add(this.groupbox3);
this.Controls.Add(this.groupBox1);
* this.Font = new System.Drawing.Font("Times New Roman", 8.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Menu = this.mainMenu1;
this.Name = "Animal";
this.Text = "Animal Information";
this.Load += new System.EventHandler(this.Animal_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupbox3.ResumeLayout(false);
this.groupbox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.d sAnimal1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p ictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdShots)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdMedications)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p cAnimalPhoto)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
Nov 11 '06 #3
The error messages:

System.ArgumentException: Child list for field owner-info cannot be created.
at System.Windows.Forms.BindingContext.EnsureListMana ger(Object
dataSource, String dataMember)
at System.Windows.Forms.BindingContext.UpdateBinding( BindingContext
newBindingContext, Binding binding)
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.set_BindingContextInt ernal(BindingContext
value)
at
System.Windows.Forms.ContainerControl.set_BindingC ontext(BindingContext value)
at System.Windows.Forms.ContainerControl.get_BindingC ontext()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.Control.get_BindingContext()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.Control.get_BindingContext()
at System.Windows.Forms.DataGrid.get_ListManager()
at System.Windows.Forms.DataGrid.RecreateDataGridRows ()
at System.Windows.Forms.DataGrid.OnFontChanged(EventA rgs e)
at System.Windows.Forms.Control.OnParentFontChanged(E ventArgs e)
at System.Windows.Forms.Control.OnFontChanged(EventAr gs e)
at System.Windows.Forms.GroupBox.OnFontChanged(EventA rgs e)
at System.Windows.Forms.Control.OnParentFontChanged(E ventArgs e)
at System.Windows.Forms.Control.OnFontChanged(EventAr gs e)
at System.Windows.Forms.ContainerControl.OnFontChange d(EventArgs e)
at System.Windows.Forms.Form.OnFontChanged(EventArgs e)
at System.Windows.Forms.Control.set_Font(Font value)
at Owner_Info.Animal.InitializeComponent() in
D:\Kennel\Owner-Info\Animal.cs:line 1602
at Owner_Info.Animal..ctor(String onum, Int32 oclose, Int32 sw3) in
D:\Kennel\Owner-Info\Animal.cs:line 126
at Owner_Info.Owner.btAinfo_Click(Object sender, EventArgs e) in
D:\Kennel\Owner-Info\Owner.cs:line 1765
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

"Mark R. Dawson" wrote:
What is the error message you are getting?

Mark
--
http://www.markdawson.org
"normb" wrote:
My name is Norm, I changed something that caused this problem, and I do not
what it was. I also do not know how to debug this problem! The line where
the crash occures is marked by an *. The windows form will not display in the
designer.
Please help!!

//
// Animal
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(822, 554);
this.Controls.Add(this.label10);
this.Controls.Add(this.groupbox3);
this.Controls.Add(this.groupBox1);
* this.Font = new System.Drawing.Font("Times New Roman", 8.25F,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Menu = this.mainMenu1;
this.Name = "Animal";
this.Text = "Animal Information";
this.Load += new System.EventHandler(this.Animal_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupbox3.ResumeLayout(false);
this.groupbox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.d sAnimal1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p ictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdShots)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdHistory)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.g rdMedications)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.p cAnimalPhoto)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
Nov 11 '06 #4
See! I told you it can get freaked with bindings!
at System.Windows.Forms.BindingContext.EnsureListMana ger(Object
dataSource, String dataMember)
at System.Windows.Forms.BindingContext.UpdateBinding( BindingContext
newBindingContext, Binding binding)
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
Of course, that doesn't help you much...
If all else fails, you could move the Font assignment outside of
InitializeComponent, and into the start of the ctor. It might mean that
it doesn't show in the designer, but it should work at runtime.

As another word of warning... bindings in the designer work OK for some
people, but personally I've lost too many hours trying to unpick
binding code that the designer has garbled. I might use the designer as
a short-cut for creating bindings, but as routine I now *immediately*
snip them from InitializeComponent and place them in a private method
that I call manually in the ctor. Again, you don't see much at design
time, but this is not my main aim; having a project that doesn't commit
suicide every second Tuesday is far preferable. Your mileage may vary,
and if you want to continue keeping your bindings in
InitializeComponent, then good luck to you (you might just need it). As
a side benefit it can give you more control and flexibility over your
bindings too.

I know of others who prefer to do *all* their UI coding by hand.
Personally I mix and match per situation. I do, however, keep designer
forms simple. If I find it is getting a bit full, I'll carve chunks
(tab pages or busy panels, for instance) into separate user controls;
this minimises the impact if (when) the designer hiccoughs - and
usually you can just fix the designer problem by loading the embedded
user-control at runtime manually instead of in InitializeComponent.

Marc

Nov 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: POnfri | last post by:
Hi I'm having trouble setting the main form visible from within the child form. I have set the main form to hide (SignatureMain.Hide()) I then load the child form from within a button on form1...
2
by: Tai | last post by:
Hi all I have 2 forms, frmMain and frmChild. In frmMain, I declare a variable f as frmChid then Call f.ShowDialog() I want when the child form is minimized, the Main form is also minimized...
4
by: Andy Hutchings | last post by:
Hi everybody - hope you can help out here. I have a form in a database, which is a columnar form from one of the tables in the db - there is a sub-form to the form which is a datasheet view of...
4
by: MLH | last post by:
I have tblVehicles and tblOwners. The former has a field that is link to a unique owner in tblOwners. Trouble is, not every vehicle can be identified with an owner. So I want to be able to leave...
1
by: Bill Borg | last post by:
Hello all, Simple chat app, where the site owner has a master window with all requests for chat, status of each room, etc., and child windows for each separate chat in which the owner is...
18
by: PC Datasheet | last post by:
An Access user saw my name in a newsgroup and sent me a request for help on a project. As part of the project, a list of the dates in a month was needed. For anyone needing a list of dates in a...
1
by: adamredwards | last post by:
I have a page with some form elements that are dynamically generated. They are inserted into the dom by first cloning a node, changing the values like name, and then inserted with insertBefore(). ...
0
by: =?Utf-8?B?ZGV0cml1czY3?= | last post by:
I'm having a problem in C# (visual studio 2005) concerning minimising parent and child forms. I need to be able to handle the minimise event for the child and tell the parent to minimise at the...
0
by: shapper | last post by:
Hello, I have a control with the following property: Private _Sections As New List(Of FormSection) Public Property Sections() As List(Of FormSection) Get If _Sections Is Nothing Then...
7
by: Marcolino | last post by:
Hi, another question for you. I looked around but found nothing. I have a MDI container calld frmMDIMain, that contain some child form....one of that forms is called frmPostIt and I need that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.