Is there a way to auto generate controls on a form from a binding source?

孤者浪人 提交于 2019-11-27 09:51:15

In Visual Studio, the Data Sources Window displays the data sources in your project. You can use Data Source Configuration Wizard to create and edit data sources from databases, services, or objects. After creating data sources in your project, you can use the Data Sources window to create data-bound controls in your user interface by dragging items from the window onto a design surface in your project:

  • Show Data Source Window from menu View > Other Windows > Data Sources or by using its shortcut Shift+Alt+D.

  • Add new Data Source using Add new Data Source toolbar button in Data Source Window or using menu Project > Add New Data Source.

  • Open a form and then in Data Source Window Set the Control to be created when dragging from the Data Sources Window. If you choose details mode in Data Source Window, for each field of data source a control will be placed on the form. If you choose DataGridView mode, DataGridView will be placed on the form.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!