ActiveX control with data properties

I am developing an ActiveX control.
I want to be able to bind the ActiveX control to a data control that will be used on the form on which this ActiveX control will be inserted.
How can I add the two properties 'DataSource' and 'DataField' to my ActiveX control so that the control can be bounded automatically to the data control.
I can only add a DataSource property but I don't know what code I should write for it.
Also, when I add a DataField property, the wizard does not accept such a property.
Please provide code.
Thank you.
Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Go to the "Tools->Procedure Attributes" menu item, select your property from the combo box at the top and then click on the Advanced button. Now in the last frame at the bottom select the property is databound and that you want it as datafield. If you have more than one property in your control, you can only have one "Datafield" but as many "Databindings" as you wish.
activexAuthor Commented:
Thank you for the answer.
It helped much.
Just one problem:
I can get the name of the DataField by using Extender.DataField from within my control. However, I can not get the name of the DataSource. Any ideas?
Thank you in advance.
Éric MoreauSenior .Net ConsultantCommented:
No particular ideas except that the DataSource property is not singular (it is an object)!
All Courses

From novice to tech pro — start learning today.