用linq排序DataTable里的数据,然后bind在GridView里
var query = from dtMyPrfPrj
select *;
GridView1.DataSource=query;
GridView1.DataBind();
这里先不排序了,先简单的查一下,语法都通不过啊,搜了好久也搜不到想要的,求大神
------解决方案-------------------- IEnumerable<DataRow> query =
from order dataTable.AsEnumerable()
where order.Field<DateTime>("OrderDate") > new DateTime(2001, 8, 1)
select order;
------解决方案--------------------query.CopyToDataTable<DataRow>( );
------解决方案--------------------
http://msdn.microsoft.com/en-us/library/bb669083.aspx