tdukek
asked on
VS 2005 Designer error loading form with UserControl
I have UserControls which contain BindingSource(s) bound to dataset/tables. Designer loads the user controls fine. Have had a random problem with the Designer getting an error when trying to load form(s) containing these UserControls. Errors are always triggered within the UserControl's InitializeComponent EndInit on the BindingSource such as below. Application runs fine.
Error
=====
DataMember property 'ProposalJobs' cannot be found on the DataSource.
Hide
at System.Windows.Forms.ListB indingHelp er.GetList (Object dataSource, String dataMember)
at System.Windows.Forms.Bindi ngSource.R esetList()
at System.Windows.Forms.Bindi ngSource.E nsureInner List()
at System.Windows.Forms.Bindi ngSource.S ystem.Comp onentModel .ISupportI nitialize. EndInit()
at CFSUIElements.CFSProposalP anel.Initi alizeCompo nent() in C:\Documents and Settings\Teresa\My Documents\Visual Studio 2005\Projects\CFS2\JobsLib rary\JobsL ibrary\CFS UIElements \CFSPropos alPanel.De signer.vb: line 1437
at CFSUIElements.CFSProposalP anel..ctor ()
Error
=====
DataMember property 'ProposalJobs' cannot be found on the DataSource.
Hide
at System.Windows.Forms.ListB
at System.Windows.Forms.Bindi
at System.Windows.Forms.Bindi
at System.Windows.Forms.Bindi
at CFSUIElements.CFSProposalP
at CFSUIElements.CFSProposalP
ASKER
Not quite.
The first reference is for the case where a bindingsource is used as a datasource for another. I'm not doing that here. I'm simply binding to a datatable within a dataset.
The second reference seems specific to a known bug (3rd reference) for using 2 datagridview(s) which I am not doing either. The error is the same though. I'm thinking it is some kind of bug with Visual Designer but would be very interested if anyone has come up with a work around once the situation arises.
The first reference is for the case where a bindingsource is used as a datasource for another. I'm not doing that here. I'm simply binding to a datatable within a dataset.
The second reference seems specific to a known bug (3rd reference) for using 2 datagridview(s) which I am not doing either. The error is the same though. I'm thinking it is some kind of bug with Visual Designer but would be very interested if anyone has come up with a work around once the situation arises.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm hoping to retain design time databinding. But, I guess I can always just add my UserControls programmatically to my main form if I have to.
ASKER
Thanks for your feedback.
might be the solution.
But, there is also that:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=427717&SiteID=1
And most of all that:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=106117