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

前端 未结 1 1425
醉话见心
醉话见心 2020-12-02 02:48

When I add a binding source to my windows form, is there a quick way to populate the form with all the properties of the bound object?

A drag and drop Field List, si

相关标签:
1条回答
  • 2020-12-02 03:31

    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.

    0 讨论(0)
提交回复
热议问题