DataGridView ComboBoxColumn显示数据库中的数据 [英] DataGridView ComboBoxColumn to display the data from database

查看:144
本文介绍了DataGridView ComboBoxColumn显示数据库中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查看从TABLE_1检索到的DataGridView中的数据。其中一列必须是ComboBox,具有TABLE_2的数据源。然后通过从组合框中选择一个值来编辑该列,并将数据保存回TABLE_1。

How is it possible to view data in DataGridView, retrieved from TABLE_1. One of the columns, must be of ComboBox, having data source from TABLE_2. Than edit that column by selecting a value from the combo box and save the data back to the TABLE_1.

推荐答案

MSDN定义结尾处有一个示例这个类 - http://msdn.microsoft .com / zh-cn / library / system.windows.forms.datagridviewcomboboxcolumn%28v = vs.110%29.aspx [ ^ ]。
There is a sample at the end of the MSDN definition of this class - http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn%28v=vs.110%29.aspx[^].


这篇关于DataGridView ComboBoxColumn显示数据库中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆