如何在Datagridview中对列进行排序? [英] How Can I Sort Column In Datagridview?
问题描述
我得到的格式是..
name | rollno | subject
ta bca2 ds
gg bca4 ds
asd bca5 ds
aa bca6 ds >
gg bca7 ds
aaa bca8 ds
daa bca3 dm
asd bca5 dm
aa bca6 dm
gg bca7 dm
aaa bca8 dm
bag bca1 gd
daa bca3 gd
gg bca7 gd
asd bca5 fds
i使用按顺序排序。因为它是循环的,我得到的结果如上所述。但我需要第二列应与其他数据一起排序。
可以帮助我吗?
the format i am getting is..
name | rollno |subject
ta bca2 ds
gg bca4 ds
asd bca5 ds
aa bca6 ds
gg bca7 ds
aaa bca8 ds
daa bca3 dm
asd bca5 dm
aa bca6 dm
gg bca7 dm
aaa bca8 dm
bag bca1 gd
daa bca3 gd
gg bca7 gd
asd bca5 fds
i used "order by sroll". since it is in loop the result i am getting is as above. but i need second column should be sorted along with other data.
can any one help me?
推荐答案
如果您通过选择查询填写数据请执行此操作。
If you are filling data through selection query please do this.
Select * from table1 order by rollno
这篇关于如何在Datagridview中对列进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!