In my current windows application I am looking on how to give a datasource to my usercontrol.
On my page I add my own usercontrol in a flowlayoutpanel, the usercontrol has 3 textboxes in it which I want to fill with data from a datasource.
usercontrol uc = new usercontrol();
flowlayoutpanel.Controls.Add(uc);
uc.DataSource?
I know that in silverlight and ASP.NET you can add a datasource to a usercontrol. In the usercontrol you get the data into the textboxes by using {Binding fieldname} as their content. I can’t find any information on this for Windows Forms.
Thanks for the help.
Thomas
I solved this (thanks to the link of Stuart) by putting setters and getters in my usercontrol.
And in my main form I will then call those setters and getters.