Re: How to set the DataSource to UserControl
On 9 Mar 2000 06:59:49 -0800, "Žydrūnas" <firstname.lastname@example.org>
>I created control which contains one standard TextBox. There is the code for
>get and set DataSource property :
>Public Property Get DataSource() As DataSource
> Set DataSource = Text1.DataSource
>Public Property Set DataSource(ByVal New_DataSource As DataSource)
> Set Text1.DataSource = New_DataSource
> PropertyChanged "DataSource"
>When I set the DataSource for my control at forms design time, application
>breakes down. But if I set the DataSource for my control at run time, it's
>Problem 1 : I want to set DataSource at forms design form. What I should
>Problem 2 : How me to retrieve DataFields?
Check out the MSDN topic Binding a Control to a Data Source under
Using Visual Basic/Component Tools Guide/Creating ActiveX
Components/Building ActiveX Controls/Visual Basic ActiveX Control
Features. It shows a much easier way to do what you are trying to do,
and as a bonus, it works!
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL