By Rainer Kempf, RK - 3/7/2009
Hello,
I had a problem with a UserControl based on SFUserControl.
I use 3 Database. In the BO i set Datasourcekey always to the Databasename.
In my UserControl i dropped some BO to UserControl. All fine.
In Control no problems. I compile Control and Drop it on form.
Setup some Properties in Usercontrol on form and run form.
Form runs with no errors and COntrol works like it should.
Now i close Form.
When i next time load form in Designer i got errormessage.
The DataSourceKey [ERPSYSTEM] is not defined.
Warning An error occurred while creating a new DataLayer for the business object.D:\Projekte.Net\StrataTestForm\StrataTestForm\Form2.Designer.vb
this is Code from Designerfile :
Me.Controls.Add(Me.MksBaseGrid1)
MksBaseGrid1 is my Control. In this Control i had 1 BO where Datasourcekey ="ERPSYSTEM"
If i ignore the Error then Form will run with no errors but i am
not able to modify anything in designer for this form.
So what i wrong ??? I have really no idea
thanks for your help
Rainer
|
By Trent L. Taylor - 3/7/2009
This sound smore like an issue within the definition of your data sources. But without a sample, it is going to be very difficult for me to determine what you are fighting. If you could please post a simple sample reproducing your issue that would be helpful.
|
By Rainer Kempf, RK - 3/8/2009
Hello Trent,
Found Problem
Problem was wrong Initialization-Order
I called a method in Load Container Event and Object was not completly instanciated
I moved my call to Container.New method and it works as expected.
Thanks for your help
Rainer
|
By Trent L. Taylor - 3/9/2009
Glad you found the problem
|