使用折叠行创建分层数据绑定网格视图 [英] Creating hierarchical data bound grid view with collapsing row

查看:74
本文介绍了使用折叠行创建分层数据绑定网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想创建一个分层数据绑定网格视图,其中包含扩展/折叠行的选项。我不想创建嵌套网格视图。



假设有一个公司/ Div /品牌/子品牌层次结构,我希望在表格中显示所有这些的当前年度和上一年度的销售额/网格视图。



如果我崩溃了公司,只有公司名称和数字应该是可见的,其他的则被折叠。产品/销售CY和销售PY应该有一个标题。



以下是结构。



产品SalesCY SalesPY 
*公司20 10
* Div1 10 4
Brand1 5 2
Brand2 5 2
* Div2 10 6
Brand3 10 6





假设*是展开/折叠的按钮。



如果有任何澄清,请帮助并告诉我。



问候,

Prash

解决方案

我猜你在谈论嵌套的GridViews。

所以,请参考下面的文章来探索更多。



1. [MSDN]演练:创建嵌套的GridView控件l [ ^ ]。

2. asp.net中gridview内部的Gridview - 嵌套gridview示例 [ ^ ]。

3. Asp.Net中的嵌套GridView示例,展开折叠 [ ^ ]。

4. ASP.Net嵌套GridViews - 带有展开和折叠功能的GridView内的GridView [ ^ ]。

5. ASP.NET中的嵌套GridView [ ^ ]。

Hi

I want to create a hierarchical data bound grid view with the options of expanding /collapsing rows.I don''t want to create a nested grid view.

Suppose a company / Div/ Brand /Sub Brand hierarchy is there so, I want to display the current year and previous year sales for all of them within a table/grid view.

If i collapse company only company name and numbers should be visible and rest other are collapsed. there should a single header for Product/ Sales CY and sales PY.

Below is the structure.

Product         SalesCY       SalesPY
     *Company          20             10
       *Div1           10              4
         Brand1         5              2
         Brand2         5              2
       *Div2           10              6
         Brand3        10              6



Assume * is a button for expand/collapse.

Please help and do let me know in case of any clarification.

Regards,
Prash

解决方案

I guess you are talking about the Nested GridViews.
So, refer the below articles to explore more.

1.
[MSDN] Walkthrough: Creating a Nested GridView Control [^].
2. Gridview inside gridview in asp.net - nested gridview example[^].
3. Nested GridView Example In Asp.Net With Expand Collapse[^].
4. ASP.Net Nested GridViews – GridView inside GridView with Expand and Collapse feature[^].
5. Nested GridView in ASP.NET[^].


这篇关于使用折叠行创建分层数据绑定网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆