存储在arraylist中并填充在datagridview中 [英] Store in arraylist and populate in datagridview
问题描述
大家好..
是vb.net的新功能.
我的问题是如何将我的数据加载到arraylist并在datagridview中手动显示它
样本表:
类别表
-------------------------
| categoryid |类别|
-------------------------
| 1 |类别1 |
| 2 | category2 |
| 3 | category3 |
| 4 | category4 |
| 5 | category5 |
--------------------------
我如何将其存储到数组中,然后提取数组中的数据并
在datagridview中填充它
有谁能够帮助我?请......
在此先感谢
hi everyone..
am new in vb.net..
my problem is how to load my data to an arraylist and manually display it in the datagridview
sample table:
category table
-------------------------
| categoryid | category |
-------------------------
| 1 | category1 |
| 2 | category2 |
| 3 | category3 |
| 4 | category4 |
| 5 | category5 |
--------------------------
how can i store that to an array then extract the data in the array and
populate it in the datagridview
can anybody help me? plssss....
thanks in advance
推荐答案
不要使用arraylist,而是创建一个DataTable,然后可以将其绑定到datagridview.没有混乱,没有大惊小怪.
Don''t use an arraylist, create a DataTable instead and then you can just bind it to the datagridview. No mess, no fuss.
^ ]可能对您有用.
This thread[^] might be useful to you.
这篇关于存储在arraylist中并填充在datagridview中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!