Using DataGridView to Update Multiple Tables

六月ゝ 毕业季﹏ 提交于 2019-12-07 23:51:33

问题


On a VB.NET 2008 form I have a DataGridView, BindingSource and TableAdapter.

The BindingSource DataSource is a dataset.

In the dataset I have a Fill command that joins three tables and this is displayed without a problem in the DataGridView.

However, I am unable to Update the dataGridView because it has multiple tables from a single TableAdapter?

Does anyone know a simple way I can update. The tables has over 200 columns and I only want to update the columns that are changed. If I use a single table I can edit data in the DataGridView and the database is updated ok.

Any help would be appreciated?

Thank you.


回答1:


Unfortunately, the Windows.Forms BindingSource, does not support complex properties (which I assume you are after).

You would have to craft your own custom BindingSource (and it will likely be bespoke to you) to handle complex property values and assignments.



来源:https://stackoverflow.com/questions/1666425/using-datagridview-to-update-multiple-tables

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