-
Re: How to set the DataSource to UserControl
On 9 Mar 2000 06:59:49 -0800, "Žydrūnas" <zydrunas.venckauskas@ntl.lt>
wrote:
>
>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
>End Property
>
>Public Property Set DataSource(ByVal New_DataSource As DataSource)
> Set Text1.DataSource = New_DataSource
> PropertyChanged "DataSource"
>End Property
>
>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
>ok.
>
>Problem 1 : I want to set DataSource at forms design form. What I should
>do?
>
>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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks