如何将数据表绑定到vb.net中的datagrid视图 [英] How to bind data table to datagrid view in vb.net

查看:85
本文介绍了如何将数据表绑定到vb.net中的datagrid视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好..我是学生。

请帮我理解数据表和数据集之间的区别请告诉我如何用Visual Basic .NET代码将数据表绑定到datagrid视图

Hello.. I am student.
please help me to understand difference between data table and data set also please tell me how to bind data table to datagrid view with Visual Basic .NET code

推荐答案

请阅读 MSDN文档 [< a href =https://msdn.microsoft.com/en-us/library/ss7fbaez%28v=vs.110%29.aspxtarget =_ blanktitle =New Window> ^ ]了解DataSet和DataTable之间的差异。



要将DataTable绑定到DataGridView组件,请使用:

Please, read MSDN documentation[^] to understand the differences between DataSet and DataTable.

To bind DataTable to DataGridView component, use:
DataGridView1.DataSource = DataTable1



DataGridView.DataSource属性(System.Windows.Forms) [ ^ ]


这篇关于如何将数据表绑定到vb.net中的datagrid视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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