Drag and Drop Data Binding??

2 отговора 127 прегледа
#1

Drag and Drop Data Binding??

Dragging and dropping controls and components and writing code to hook them up seems contrary to the idea that data binding has improved productivity. Rather than manually drag and drop and then configure your UI, you can instead drag and drop a data source from the Data Sources Window onto a form and have the Windows Forms Designer create and configure a bound UI for you.

When you drag and drop a data source, the Windows Forms Designer:

* Adds a BindingSource for that data source
* Adds a strongly typed DataSet and table adapter if required
* Adds the required controls bound to the BindingSource, providing them with reasonable names (apart from DataGridView columns)
* Adds a BindingNavigator bound to the BindingSource

You can also configure whether the dropped data source creates a DataGridView-UI or Details-UI and in either case which controls are generated to suit.

Някой пробвал ли го е това?
При мен когато отворя design view-то на формата и Data Sources Window се изпразва и всичко става неактивно в него. Някакви идеи защо е така и как да се сбори?

Отговор
в отговор на Любитeл #2

Re: Drag and Drop Data Binding??

виж някъде за настройки, където се определя за кой dbType какъв контрол може да се генерира, като закачиш за всеки dbType възможен контрол би трябвало да "тръгне"

-------------
Special killer double trouble triple extra nicotine monster!

Редактирано от z_free на

Отговор
в отговор на z_free #3

Re: Drag and Drop Data Binding??

Баси тъпата история - верно това се оказа проблема
Важното е че потегли

Отговор