对DataTable中的列进行排序 [英] Sorting columns in a DataTable
本文介绍了对DataTable中的列进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是:
DataTable可以有排序列。我想点击我的GridView的列标题,该标题由填充DataTable代码填充。每次我尝试查找排序列时,都会使用DataSet代码。
如果有人知道教程或只是答案如果可以做到的话我会非常感激。
谢谢。
My question is:
Can a DataTable have sorting columns. I want to click on the column headers of my GridView that is being populated by a Fill DataTable code. Every time I try to look up Sorting columns they use a DataSet code.
If anyone knows of a tutorial or just an answer if this can be done I would really appreciate it.
Thanks.
推荐答案
DataSet
只是DataTables的集合
。
除非您使用多个DataTables
,否则您总是可以使用一个DataTable
填充GridView
。
DataSet
is just a collection ofDataTables
.
Unless you are using multipleDataTables
, you can always use oneDataTable
to populateGridView
.
这篇关于对DataTable中的列进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文