前台代码:
<asp:GridView ID="tabgv" runat="server" DataKeyNames="ysId" ShowFooter="True" OnRowDataBound="GridView1_RowDataBound"
OnRowCreated="GridView1_RowCreated" AutoGenerateColumns="False" Width="99%" CssClass="gridview"
EnableModelValidation="True" OnRowCancelingEdit="tabgv_RowCancelingEdit" OnRowEditing="tabgv_RowEditing"
OnRowUpdating="tabgv_RowUpdating">
<RowStyle BorderColor="Black" BorderStyle="None" />
<Columns>
<asp:BoundField DataField="gsHkrno" HeaderText="项目编号" ReadOnly="True">
<ItemStyle Width="5%" HorizontalAlign="Center" />
<FooterStyle BorderWidth="0px" />
</asp:BoundField>
<asp:TemplateField HeaderText="项目名称">
<ItemTemplate>
<asp:HyperLink ID="Hyp_gsName" runat="server" ForeColor="Blue" Text='<%# Bind("gsName") %>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="25%" HorizontalAlign="left" />
<FooterTemplate>
<asp:Label ID="Label4" runat="server" Font-Bold="True" Text="合 计:" Width="61px"></asp:Label>
</FooterTemplate>
<FooterStyle BorderColor="Black" BorderWidth="0px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="概算金额">
<ItemTemplate>
<asp:Label ID="labgsMoney" runat="server" Text='<%#Bind("gsMoney", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="8%" HorizontalAlign="right" />
<FooterTemplate>
<asp:Label ID="labtotalgsMoney" runat="server" ForeColor="Red"></asp:Label>
</FooterTemplate>
<FooterStyle BorderColor="Black" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="开工至上年底\n累计完成概算">
<ItemTemplate>
<asp:Label ID="labkgzsndwcGsMoney" runat="server" Text='<%# Bind("footMoney", "{0:N2}") %>'></asp:Label>
<asp:HiddenField ID="hdnysYear" runat="server" Value='<%# Eval("ysYear") %> ' />
<asp:HiddenFie