开发者

make Footer template visible and invisible in button click

I have a grid with footer template. It consists of a text box in which i will add some value and after clicking btnAdd the value present in the footer template will append to the main grid. Below is my footer template. I want to make the footer template visible only on clicking btnAdd. How to make it visible and invisible on some button click. Note: button located outside grid.

<FooterTemplate>
                        <asp:TextBox ID="txtFact开发者_运维百科or" Style="margin-left: 210px" Visible='<%# IsInEditMode %>' runat="server"  >
                        </asp:TextBox> 


You need to rebind your datasource after setting the ShowFooter = true.


You could set GridView.ShowFooter = IsInEditMode from codebehind on button-click.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.showfooter.aspx


use this

GridView1.ShowFooter = false; 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜