I want to know how to create controls in Winforms using Datasource.I mean whatever fields in table that should be created as control in Form . I have seen that by drag and drop those fileds it create control .How its working like that?
2 Answers
The behavior that you mention can be done using he Data Source Window in Visual Studio. The following MSDN titled Data Sources Window will take you through all the steps needed to do what you want from connecting to a database to setting what controls show when you drag the data source onto the form.
Comments
You can use a sourcecodegenerator like mygeneration plus a generator template for winforms.