如何在网格中显示数据 [英] How to display data in grid
本文介绍了如何在网格中显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在vb.net 2003中,该函数为DataGrid1.SetDataBinding(),
但是在vb.net2005中该功能不可用,您能否告诉我如何在2005年的运行时在网格中显示数据.
谢谢与问候
解决方案
在所有版本中,您都使用 ^ ]属性,用于指定绑定到数据并将显示的数据.
进一步了解Mark所拥有的说
从数据库下载数据到datatable
或dataset
ADO.NET示例 [ datagridview1.datasource = myDataTable
i want to display data in a grid at runtime from an access file in vb.net .
In vb.net 2003 the function is DataGrid1.SetDataBinding(),
but in vb.net2005 the function is not available, can u please tell me how to display data in grid at runtime in 2005.
thanks & regards
解决方案
In all versions you use the DataSource[^] property of a control to specify what data is bound to it and will be displayed.
To further what Mark has said
Download the data from the database into either adatatable
ordataset
ADO.NET Sample[^] - this has examples that you could use to learn about ADO.NET
and then you set it yourdatasource
, for example,
datagridview1.datasource=myDataTable
这篇关于如何在网格中显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文