According to the effect :

The front desk code :

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<link href="../../Css/default.css" rel="stylesheet" type="text/css" />
<script src="../../../Common/Scripts/Order/popup.js" type="text/javascript"></script>
<script src="../../../Common/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div class="default_title_all" style="width: 98%">
<ul>
<li class='hovertab '><span style="color: White"> Comprehensive analysis of suppliers </span></li>
</ul>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
</Scripts>
</asp:ScriptManager>
<uc4:SupplyAnalysis ID="SupplyAnalysis1" runat="server" />
<div class="default_title_all" style="width: 98%">
<ul>
</ul>
</div>
<table width="98%" border="" align="center" cellpadding="" cellspacing="">
<tr>
<td align="center" valign="top">
<table width="100%" border="" cellspacing="" cellpadding="">
<tr>
<td>
<table width="100%" border="" cellspacing="" cellpadding="" class="margin_center default_table_nobottom_dingdan">
<tr valign="middle">
<td align="right">
Area :
</td>
<td align="left">
<uc3:DropDownListUC ID="ddlArea" runat="server" CssClass="w120" />
</td>
<td align="right">
Account Manager :
</td>
<td align="left">
<uc3:DropDownListUC ID="ddlClientManager" runat="server" CssClass="w120" />
</td>
<td align="right">
Policy types :
</td>
<td align="left">
<asp:DropDownList runat="server" ID="ddlType">
<asp:ListItem Text=" All " Value=""></asp:ListItem>
<asp:ListItem Text=" Ordinary " Value=""></asp:ListItem>
<asp:ListItem Text=" Special Offer " Value=""></asp:ListItem>
<asp:ListItem Text=" Direct reduction " Value=""></asp:ListItem>
</asp:DropDownList>
</td>
<td align="right">
date :
</td>
<td align="left">
<input type="text" id="txtBeginTime" runat="server" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"
readonly="readonly" />
to <input type="text" id="txtEndTime" runat="server" onfocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" />
</td>
<td>
</td>
</tr>
<tr valign="middle">
<td align="right">
Navigation Division :
</td>
<td align="left">
<uc3:DropDownListUC ID="ddlAirwayCompanyCode" runat="server" CssClass="w120" />
</td>
<td align="right">
set out :
</td>
<td align="left">
<uc3:TextBoxUC ID="txtDeparturePort" runat="server" CssClass="w120" />
</td>
<td align="right">
arrive :
</td>
<td align="left">
<uc3:TextBoxUC ID="txtArrivePort" runat="server" CssClass="w120" />
</td>
<td>
</td>
<td align="left">
<asp:Button ID="btnSearch" runat="server" Text=" check Inquiry " CssClass="button_1" OnClick="btnSelect_Click" />&nbsp;&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="" cellspacing="" cellpadding="">
<tr>
<td rowspan="">
<asp:GridView ID="gvInterfaceUser" runat="server" Width="100%" AutoGenerateColumns="False"
GridLines="None" CellPadding="" ShowHeaderWhenEmpty="true" OnRowDataBound="gvInterfaceUser_RowDataBound"
CssClass="default_table margin_center dingdan_table margin_top_10" OnRowCommand="gvInterfaceUser_RowCommand" ShowFooter="True">
<RowStyle HorizontalAlign="Center" CssClass="MsOverBgColor"></RowStyle>
<HeaderStyle HorizontalAlign="Center" Height="28px" CssClass="background_efeff0">
</HeaderStyle>
<FooterStyle HorizontalAlign="Center" Height="28px" CssClass="background_efeff0"
ForeColor="Red" />
<Columns>
<asp:TemplateField HeaderText=" Serial number ">
<ItemTemplate>
<%#Container.DataItemIndex+ %>
</ItemTemplate>
<ItemStyle Width="4%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:TemplateField>
<asp:BoundField DataField="suUserName" HeaderText=" supplier ">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField> <asp:BoundField DataField="sumCount" HeaderText=" The total number of tickets ">
<ItemStyle Width="8%" CssClass=" default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:BoundField DataField="pastePoint" HeaderText=" The number of tickets to be counted ">
<ItemStyle Width="8%" CssClass=" default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:BoundField DataField="feesReceivable" HeaderText=" Handling charges should be collected " DataFormatString="{0:0.00}">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:BoundField DataField="pasteTotalMoney" HeaderText=" Amount of money " DataFormatString="{0:0.00}">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:TemplateField HeaderText=" real income ">
<ItemTemplate>
<%# (Convert.ToDecimal(Eval("feesReceivable")) - Convert.ToDecimal(Eval("pasteTotalMoney"))).ToString("0.00")%>
</ItemTemplate>
<ItemStyle Width="10%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:TemplateField>
<asp:BoundField DataField="DepartCityCount" HeaderText=" Local departure tickets ">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:BoundField DataField="ArriveCityCount" HeaderText=" The number of return tickets ">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
<asp:TemplateField HeaderText=" The number of tickets from other places ">
<ItemTemplate>
<%# Convert.ToInt32(Eval("sumCount")) - Convert.ToInt32(Eval("DepartCityCount"))-Convert.ToInt32(Eval("ArriveCityCount")) %>
</ItemTemplate>
<ItemStyle Width="10%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:TemplateField>
<asp:BoundField DataField="specailCount" HeaderText=" The number of special tickets ">
<ItemStyle Width="8%" CssClass="default_table_zc_left default_table_zc_bottom" />
</asp:BoundField>
</Columns>
<AlternatingRowStyle CssClass="F0F0F0 MsOverBgColor" Height="28px" />
</asp:GridView>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div id="sumCount" runat="server" style="padding-left: 20px; padding-top: 10px;display:none;">
<label>
total </label> The total number of tickets :&nbsp;&nbsp;&nbsp; The number of tickets to be counted :<asp:Label runat="server" ID="lblsumPasteTicketCount"></asp:Label>&nbsp;&nbsp;&nbsp; Handling charges should be collected :<asp:Label
runat="server" ID="lblRecived"></asp:Label>
&nbsp;&nbsp;&nbsp; Amount of money :<asp:Label runat="server" ID="lblPasteMoney"></asp:Label>&nbsp;&nbsp;&nbsp; real income :<asp:Label
runat="server" ID="lblActualIncome"></asp:Label>
</div>
</td>
</tr>
<tr>
<td align="center" colspan="">
<uc1:WUCWorkPager ID="WUCWorkPager1" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="details" style="display: none;">
<table>
<tr>
<td>
request
</td>
<td>
<div id="tdRequest" runat="server">
</div>
</td>
</tr>
<tr>
<td>
return
</td>
<td>
<div id="tdResponse" runat="server">
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Background code :

 public decimal mysum3 = ;// The total number of tickets 
public decimal mysum4 = ;// The number of tickets to be counted
public decimal mysum5 = ;// Handling charges should be collected
public decimal mysum6 = ;// Amount of money
public decimal mysum7 = ;// Local departure tickets
public decimal mysum8 = ;// The number of return tickets
public decimal mysum9 = ;// The number of special tickets protected void gvInterfaceUser_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView myrows = (DataRowView)e.Row.DataItem; mysum3 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum4 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum5 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum6 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum7+= Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum8 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString());
mysum9 += Convert.ToDecimal(myrows[].ToString() == "" ? "" : myrows[].ToString()); }
// total
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[].Text = " total ";
e.Row.Cells[].Text = mysum3.ToString();
e.Row.Cells[].Text = mysum4.ToString();
e.Row.Cells[].Text = mysum5.ToString("0.00");
e.Row.Cells[].Text = mysum6.ToString("0.00");
// real income
e.Row.Cells[].Text = (mysum5 - mysum6).ToString("0.00");
e.Row.Cells[].Text = mysum7.ToString();
e.Row.Cells[].Text = mysum8.ToString();
// The number of tickets from other places
e.Row.Cells[].Text = (mysum3-mysum7-mysum8).ToString();
e.Row.Cells[].Text = mysum9.ToString(); }
}

c# GridView Footor More related articles on total

  1. android When the phone rotates the screen, let GridView The number and width of columns are adaptive

    I accidentally opened one that I did a year ago android Application code , See a small function point implemented inside ( As the title ), Now write an article and take notes . The problem was , When you rotate the screen, you need to make gridview The number and width of columns are adaptive to the screen width , Every ...

  2. Asp.net Set up GridView Adaptive column width does not deform

    Dynamically bound GridView Because the number of columns is not fixed , And there are too many columns , Set this way GridView Fixed width can't meet the demand . For this reason, two methods are put forward to achieve GridView Adaptive column width without distortion effect . // stay GridView Row data ...

  3. GridView Set... In the template column

    stay GridView The template column is set as follows <asp:TemplateField HeaderText=" Delete ">    <ItemTemplate>         ...

  4. How to be in asp.net In order to get GridView Hide column values ?

    Before reading this article , I get gridview The general practice of the values of a row and a column is as follows :row.Cells[3].Text.ToString(). It's a bit of a fool stay Asp.net 2.0 A new data binding control has been added in :Gri ...

  5. Mouse pointing at GridView A column shows DIV Floating list

    demand : When GRIDVIEW Too many data columns , It's not convenient to display all the information in the same row or some sub information. You need to point the mouse to a key column GRIDVIEW Display its child information when it's in use . Design : First, capture the floating data that needs to be displayed once and for all . Not when the mouse is pointing ...

  6. The solution can't get GridView Hidden column value problem

    Today I met a person who wanted to get GridView The problem of hiding column values , Several methods have been tried , Or you can't get , Or get the value of the class column and hide it , But there's one more column in the style ,, But finally found a function to achieve and achieve the perfect hidden column method and everyone points ...

  7. Asp.net Simple code settings GridView Adaptive column width does not deform

    Dynamically bound GridView Because the number of columns is not fixed , And there are too many columns , It's a custom setting gridView Width // stay GridView In the event that the row data is bound protected void gvObjectList_Ro ...

  8. Numpy Study array np.where lexsort section Average by row and column mean

    array Can be created through list to array print Come out like a form , You can look at it in rows and columns . It turned out to be a list It's a line np.where Used to find a condition The coordinates under , Back to a 2 individual ...

  9. .Net GridView Serial number column

    to GridView Add a row : Serial number column <asp:TemplateField HeaderText=" Serial number "> <ItemTemplate> <%# (( ...

Random recommendation

  1. Java in Comparable and Comparator Interface difference analysis

    Java in Comparable and Comparator Interface difference analysis source : Yard rural network  | Time :2015-03-16 10:25:20 | Read the number :8902 [ Reading guide ] This article will analyze in detail Java in Comp ...

  2. Luogu P3370 【 Templates 】 String hash

    P3370 [ Templates ] String hash 143 adopt 483 Submit Subject provider HansBug label The difficulty is universal - Submit    Discuss    Answer key The latest discussion Cannot see , Where is hash - Title Description As the title , Given N A string ( The first i individual ...

  3. About the VS Post on the website

    stay vs The website built on can only be used localhost Visit , Want to publish your own website on this machine to IIS above , So you can use it directly IP The address came to visit , So do it as follows : 1. First you need to use vs Post your own website 1. ...

  4. &lt;input type=&quot;text&quot;/&gt; Properties when not entered value The default value of --js Way of learning

    At Baidu ife It was a mistake of my own that caused me to think about <input type="text"/> Learning from . Post the code first : <!DOCTYPE html> <html&g ...

  5. PHP Two points search ( Recursion and loops )

    Binary search can be realized by recursion and loop , Ideas as follows : Compare the number you want to find with the middle number , If equal , It means to find , Returns the subscript If the number you want to find is less than the number in the middle , The number to be found is distributed on the left side of the array , modify right The border , Make it wait ...

  6. js Array to repeat

    Array to repeat is js The method commonly used in , Four types are summarized as follows : 1. for + indexOf  To repeat var arr = [3,5,5,4,1,1,2,3,7,2,5]; var target = []; fo ...

  7. Flask frame brief introduction

    One .Flask Introduce Flask It's based on Werkzeug,Jinja 2  Lightweight web Development framework , Use Python Development , Easy to get started . Two . install Flask 3、 ... and . first Flask Program 1. To write app.p ...

  8. Java in String As synchronized Synchronization lock use details

    Java Use in String Make synchronization lock stay Java in String It's a special kind of existence , stay jdk in String After it is created, it shares the constant pool , Even in jdk1.8 Then the implementation is different , But the function is similar . With this feature ...

  9. Create free certificates , Implement website HTTPS

    Use Certbot To achieve HTTPS, We will consider adopting Cerbot To realize To configure Certbot certificate Certbot The official website of  https://certbot.eff.org/ , Open the official website to select w ...

  10. About SpringCloud Microservice architecture , Tips 502 Bad Gateway nginx/1.10.0

    1. The specific environment is the use of virtual machines , And install... On the virtual machine nginx Reverse proxy the port service on the local machine After I build the environment step by step , It can be used normally for the first time , When I turn off the computer , Start the environment again , You'll find that after entering the web address ...