﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Error with usercontrol</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 22 Sep 2026 16:02:48 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8459.aspx</link><description>Thank you Ivan and Ben</description><pubDate>Tue, 24 Apr 2007 09:48:10 GMT</pubDate><dc:creator>Rav</dc:creator></item><item><title>Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8344.aspx</link><description>I have a usercontrol with a&amp;nbsp; BO and&amp;nbsp;some textboxes bound to a businessBindingsource.&amp;nbsp; When I drag the usercontrol onto a blank strataframe standard form, i get&amp;nbsp;an error&amp;nbsp;"Failed to create component... cannot bind to property or column... Please see screenshot for the full error msg.&amp;nbsp; If I set the binding property of the textboxes to none, I can drag the control onto the form with no problem.</description><pubDate>Tue, 24 Apr 2007 09:48:10 GMT</pubDate><dc:creator>Rav</dc:creator></item><item><title>RE: Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8454.aspx</link><description>Yes, if you created your app with the "w/ Security" template, then there will be some code in the ShowLoginAndInitMainForm method of the AppMain.vb (Program.cs) file.&amp;nbsp; Just comment that code out and it will remove the login form.&amp;nbsp; There is also some other code that is in there that you'll probably want to comment out as well.&amp;nbsp; The help topic Ivan mentioned describes each extra piece and what it does.</description><pubDate>Tue, 24 Apr 2007 09:10:32 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8444.aspx</link><description>Hi Rav.&lt;/P&gt;&lt;P&gt;Have a look at the Help File, under "Defining Security within the Application".&lt;/P&gt;&lt;P&gt;I guess you created your application using the "Strataframe Windows Application w/ Security" template. So, if you have a look at your AppMain.vb (or Program.cs) you will find the code that does the trick, according to the help file.&lt;/P&gt;&lt;P&gt;There are some built in accounts and passwords set in there (&lt;FONT size=2&gt;InitApplication). You can change them or use as they are.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Hope it helps.&lt;/FONT&gt;</description><pubDate>Mon, 23 Apr 2007 16:56:40 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8441.aspx</link><description>[quote][b]Ben Chase (04/20/2007)[/b][hr]This looks like an instantiation order problem.&amp;nbsp; Most likely, the BBS's BusinessObject property is not being set within the InitializeComponent of the UserControl before the Binding is added to the textbox's DataBindings collection.&amp;nbsp; There's not a way to force the textbox to wait until the BO has been set to add the binding.&amp;nbsp; You can, however, create an inherited BusinessBindingSource and in it's constructor add an instance of the business object that you need.&amp;nbsp; The business object would be contained within the BBS, so that might cause some problems if you want to handle BO events on the user control (you would just have to add the handlers manually...).&amp;nbsp;&amp;nbsp; Another option would be to copy the designer code for the creation of the bindings and move the code out off the .designer.* file and into the constructor of your user control after InitializeComponent() is called.&amp;nbsp; This would force the textboxes to wait until the BusinessObject has been set before binding to the BBS.[/quote]&lt;/P&gt;&lt;P&gt;That fixed it.&amp;nbsp; Thank you.&amp;nbsp; However, when I try to run my app I now get a "User Authentication" screen asking for a username and password.&amp;nbsp; I'm haven't&amp;nbsp;experimented with&amp;nbsp;any role based security yet&amp;nbsp;and I'm using windows authentication for sql server.&amp;nbsp; What password is this asking for?</description><pubDate>Mon, 23 Apr 2007 12:01:28 GMT</pubDate><dc:creator>Rav</dc:creator></item><item><title>RE: Error with usercontrol</title><link>http://forum.strataframe.net/FindPost8358.aspx</link><description>This looks like an instantiation order problem.&amp;nbsp; Most likely, the BBS's BusinessObject property is not being set within the InitializeComponent of the UserControl before the Binding is added to the textbox's DataBindings collection.&amp;nbsp; There's not a way to force the textbox to wait until the BO has been set to add the binding.&amp;nbsp; You can, however, create an inherited BusinessBindingSource and in it's constructor add an instance of the business object that you need.&amp;nbsp; The business object would be contained within the BBS, so that might cause some problems if you want to handle BO events on the user control (you would just have to add the handlers manually...).&amp;nbsp;&amp;nbsp; Another option would be to copy the designer code for the creation of the bindings and move the code out off the .designer.* file and into the constructor of your user control after InitializeComponent() is called.&amp;nbsp; This would force the textboxes to wait until the BusinessObject has been set before binding to the BBS.</description><pubDate>Fri, 20 Apr 2007 09:20:04 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>