DatagridView与gridview以及SqldataReader -reg的绑定 [英] DatagridView vs gridview and Bindings with SqldataReader -reg
本文介绍了DatagridView与gridview以及SqldataReader -reg的绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以帮助我了解如何在C#中使用DataGridView1与Sqldatareader绑定.我知道我们可以绑定datagrid1.datasource = reader;
datagrid1.databind();在asp.net中,但在Windows的C#.net中,我无法像以前一样进行绑定..
为什么我不能以同样的方式进行绑定..以及在c#
Anyone can help me that how to bind with Sqldatareader with DataGridView1 in C#. I knew that we can bind datagrid1.datasource= reader;
datagrid1.databind(); in asp.net but in C#.net for windows I''m unble to bind like the same..
why i could not bind in sameway..and what is the procedure to bind a reader to datagridview in c#
推荐答案
中将读取器绑定到datagridview的过程是什么,这应该使您入门: ^ ]
它比较了两个(web和winforms)并显示了(a)这样做的方法.
This should get you started: How to populate DataGridView, GridView with SQL statement in C#[^]
It compares the two (web and winforms) and shows (a) method of doing it.
这篇关于DatagridView与gridview以及SqldataReader -reg的绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文