Expand / Collaspe Gridview> Childview [英] Expand/Collaspe Gridview > Childview

查看:59
本文介绍了Expand / Collaspe Gridview> Childview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟随了Rajib Ahmed的博客并实施了这个并且效果很好。现在用户很高兴他们想要更多。 (他们总是想要更多。哈哈)。

http://www.progtalk.com/ViewArticle.aspx?ArticleID=16


1.我正在尝试实施ShowAll &安培; " HideAll"按钮,我试图按照他的建议,但没有成功。有人可以帮忙吗?我正在截止日期前工作。我真的很感激。

I followed Rajib Ahmed''s blog and implemented this and it works GREAT. Now that users are happy they want MORE. (They always want more. lol).

http://www.progtalk.com/ViewArticle.aspx?ArticleID=16

1. I am trying to implement "ShowAll" & "HideAll" button and I tried to follow his suggestion but No success. Can someone please help? I am working on a deadline. I would truly appreciated.

展开 | 选择 | Wrap | 行号

推荐答案

Dorandoran可以请您发布代码你正在使用,因为我不想阅读整篇文章来猜测你做对是做什么......


什么是HideShowPanel()方法的代码?

您目前正在做什么来调用HideShowAll()方法?
Dorandoran could you please post the code that you''re using because I don''t have want to read that entire article to to guess at what you''re doing right or wrong...

What''s the code for the HideShowPanel() method?
What are you currently doing to call the HideShowAll() method?


附加了java文件。


1.我将此添加到default.aspx页面。 (这是在gridview ctrl之外)

< asp:Hyperlink id =" hlShowAll" RUNAT = QUOT;服务器" >全部显示< / asp:超链接>


2.我将此添加到default.aspx.cs页面(页面上)

this.hlShowAll.Attributes [ " onclick"] =" ShowAll(''''" + this.DataGrid1.ClientID +"'''');" ;;


请让我知道。谢谢你的帮助。



======这里是我所指的Rajib'上的帖子= = = =

以下是如何一次扩展所有行:

1.将超链接列拖到页面,并为其指定以下ID:HLShowALL

2.在Page_Load方法上添加此代码,而不是BindData方法的回发:
the java file is attached.

1. I added this to default.aspx page. (and this is outside the gridview ctrl)
<asp:Hyperlink id="hlShowAll" runat="server" > Show All</asp:hyperlink>

2. I added this to default.aspx.cs page (on page)
this.hlShowAll.Attributes["onclick"]="ShowAll(''''" + this.DataGrid1.ClientID + "'''');";

Please let me know. Thanks for the help.


====== here is the area on the Rajib''s post I was refering to = = = =
Here is how you can expand all the rows at once:
1. Drag a hyperlink column to the page, and give it the following id: HLShowALL
2. Add this code on the Page_Load method, on not postback where the BindData method is:
展开 | 选择 | Wrap < span class =codeDivider> | 行号


以下代码通过连接单词uniquename来创建一个ID。和存储在变量j中的数字。

Well the following code creates an ID by concatenating the word "uniquename" and the number stored in the variable "j".

展开 | 选择 | Wrap | 行号


这篇关于Expand / Collaspe Gridview&gt; Childview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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