在我的asp.net Web应用程序中,我想在代码端获取gridview页脚值 [英] In my asp.net web application i want to get gridview footer value in code side

查看:62
本文介绍了在我的asp.net Web应用程序中,我想在代码端获取gridview页脚值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的asp.net Web应用程序中,我想在代码端获取gridview页脚值
我的页脚设计代码

In my asp.net web application i want to get gridview footer value in code side
my design code of footer

<asp:BoundField DataField="Amount" DataFormatString="{0:N2}"

                                        HeaderText="Amount">
                                        <FooterStyle HorizontalAlign="Right" />
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:BoundField>


该页脚包含净额,想要在此处获得该值''


that footer contain net amount iwant to get that value here''

protected void ibtnSave_Click(object sender, EventArgs e)
       {


小数折扣= 0,运费= 0,OtherExpense = 0,NetAmount = 0,CurrencyRate = 0;
NetAmount = ....在这里,我想从该页脚中获取netamount

请帮助我


decimal Discount = 0, Freight = 0, OtherExpense = 0, NetAmount = 0, CurrencyRate = 0;
NetAmount =.... here i want to get netamount from that footer

please help me

推荐答案

检查此内容:

http://www.asp.net/data-access/tutorials/displaying-summary-information-in-the-gridview-s-footer-cs [
Check this :

http://www.asp.net/data-access/tutorials/displaying-summary-information-in-the-gridview-s-footer-cs[^]

Now, when you want to fetch the value from the footer row use the below method :

protected void btnGo_Click(object sender, EventArgs e)
{
        txtTotal.Text = Gridview1.FooterRow.Cells[0].Text;
}


这篇关于在我的asp.net Web应用程序中,我想在代码端获取gridview页脚值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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