关于GridView单元格数值的问题
请问如何将GridView某两个单元格中的值相加后显示在另一个单元格中呢,值为带小数点的数值.
------解决方案-------------------- <%# Convert.ToInt32(Eval( "f1 ").ToString())+ Convert.ToInt32(Eval( "f2 ").ToString())%>
------解决方案-------------------- <asp:TemplateField >
<ItemTemplate>
<asp:Label ID= "Label1 " runat= "server " Text= ' <%# Eval( "data1 ") %> '> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID= "Label2 " runat= "server " Text= ' <%# Eval( "data2 ") %> '> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:Label ID= "Label1 " runat= "server " Text= ' <%# Convert.ToInt32(Eval( "data1 ").ToString())+ Convert.ToInt32(Eval( "data2 ").ToString())%> '> </asp:Label>
</ItemTemplate>
</asp:TemplateField>