我必须基于gridview中的列在gridview中进行分组. [英] I have to make grouping in a gridview based on a column in gridview.
本文介绍了我必须基于gridview中的列在gridview中进行分组.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须基于gridview中的列在gridview中进行分组.
前-
我在gridview中有这样的记录:
ID名称代码值
1 A a 1
2 A a 2
3 B b 3
4 B b 4
所需结果(根据代码列分组):
ID名称值
a
1 A 1
2 A 2
b
1 B 3
2 B 4
请为此提供解决方案.
I have to make grouping in a gridview based on a column in gridview.
Ex-
I have records like this in gridview:
ID Name Code Value
1 A a 1
2 A a 2
3 B b 3
4 B b 4
Result required(grouping based on code column):
ID Name Value
a
1 A 1
2 A 2
b
1 B 3
2 B 4
Please give solution for this.
推荐答案
要在gridView中进行分组,您需要使用Nested GridView
可以肯定地解决您的问题,请参考一些线程:
本文介绍了如何嵌套GridView控件:
使用GridView多级嵌套的Master/Detail数据显示 [ ^ ]
构建嵌套带有ASP.NET的GridView控件 [创建自定义排序用户界面(C#) [网格视图 [ ^ ]
GridViewHelper [ ^ ]是一个帮助程序类,用于帮助创建组和摘要.
希望对您有所帮助!
For grouping in gridView you need to useNested GridView
which will solve your problem for sure, please refer some threads:
This article presents how the GridView control can be nested:
Multilevel Nested Master/Detail Data Display Using GridView[^]
Build a Nested GridView Control with ASP.NET[^]
The next article, will shows how you can override Render event to create group header based on your sorting column.
Creating a Customized Sorting User Interface (C#)[^]
You can use Edit permissions in Grid View[^]
GridViewHelper[^] as the name suggests, a helper class to aid the creation of groups and summaries.
Hope it helps!
您需要Grid扩展另一个Grid参见此示例,它将为您提供帮助
如何在网格内显示网格 [
Hi ,
You need Grid Expand another Grid See this Example it will help you
How to show Grid Within Grid[^]
Best Regards
M.Mitwalli
观看以下视频:
http://www.youtube.com/watch?v=Qc53ZekBryE [ http://www.youtube.com/watch?v=5LYyIZabghw [
Hi,
See the following videos:
http://www.youtube.com/watch?v=Qc53ZekBryE[^]
http://www.youtube.com/watch?v=5LYyIZabghw[^]
这篇关于我必须基于gridview中的列在gridview中进行分组.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文