如何通过代码隐藏在网格视图字段中应用排序. [英] how to apply sorting in grid view field through codebehind.
本文介绍了如何通过代码隐藏在网格视图字段中应用排序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过代码隐藏在网格视图字段中应用排序.
而我的gridview代码是:
how to apply sorting in grid view field through codebehind.
and my gridview code is:
SqlDataAdapter da = new SqlDataAdapter("select * from newcustomer ", con);
con.Open();
DataTable ds = new DataTable();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
con.close();
推荐答案
引用相似的线程
Gridview排序和分页 [如何在gridview中对数据进行排序 [ ^ ]
更多资源此处 [ ^ ]
您也可以查看这些
处理GridView.OnSorting()并使用LINQ动态创建排序表达式 [ ^ ]
使用linq对网格视图进行排序 [ ^ ]
Refer similar threads
Gridview sorting and paging[^]
how to sort the data in gridview[^]
More resources here[^]
Also you can check these out
Handle GridView.OnSorting() and create sorting expression dynamically using LINQ[^]
sorting grid view with linq[^]
这篇关于如何通过代码隐藏在网格视图字段中应用排序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文