在C#Windows App中重新排序数据表 [英] Re-order Datatable in c# windows app
本文介绍了在C#Windows App中重新排序数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请注意-> ;:这是Windows应用程序
我正在使用数据表&然后将其绑定到datagridview.我要寻找的是:-
我在数据表中有一列,该列具有值(示例)a,b,f,c,d,e,f,g,h,c,t,u,f现在我需要的是开始搜索的循环c&然后寻找f&然后将它们一个放在另一个下面.
谢谢,
Karthick V
Hi all,
Please Note-->: This is for Windows application
I''m using a datatable & then binding it to datagridview. What i''m in search of is this:-
I''ve a column in datatable which has values (example) a,b,f,c,d,e,f,g,h,c,t,u,f what i need now is loop which starts to search for c & then look for f & then place them one below the other.
Thanks,
Karthick V
推荐答案
您不需要循环,对数据表进行排序
http://msdn.microsoft.com/en-us/library/system. data.dataview.sort.aspx [ ^ ]
You don''t need a loop, sort the datatable
http://msdn.microsoft.com/en-us/library/system.data.dataview.sort.aspx[^]
这篇关于在C#Windows App中重新排序数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文