Addition of item template contents in grid view in asp.net

Posted by Chaithragm under ASP.NET on 9/5/2013 | Points: 10 | Views : 986 | Status : [Member] | Replies : 1
hello im using gridview to display the details of students .
im displaying the max marks and the obtained marks of a students in a label
from that i need to calculate the total of max marks and the total obtained marks in a gridview dynamically.

here is the code of table in item template of gridview

<table border="1">
<tr>

<td> <asp:Label ID="Label11" runat="server" Text="SSLC"></asp:Label></td>
<td><asp:Label ID="Label2" runat="server" Text='<%# "Max: " + Eval("sslc_max_marks") %>'></asp:Label> </td>
<td><asp:Label ID="Label4" runat="server" Text='<%# "Obt: " + Eval("sslc_marks_obtained") %>'></asp:Label></td>
<td> <asp:Label ID="Label5" runat="server" Text='<%# "Per: " + Eval("sslc_percentage_rounded")+ " %" %>'></asp:Label></td>
</tr>
<tr>
<td> <asp:Label ID="Label12" runat="server" Text="Kan Typ"></asp:Label></td>
<td><asp:Label ID="Label13" runat="server" Text='<%# "Max: " + Eval("kan_typing_max_marks") %>'></asp:Label> </td>
<td><asp:Label ID="Label14" runat="server" Text='<%# "Obt: " + Eval("kan_typing_marks_obtained") %>'></asp:Label></td>
<td> <asp:Label ID="Label15" runat="server" Text='<%# "Per: " + Eval("kan_typing_percentage_rounded")+ " %" %>'></asp:Label></td>
</tr>
<tr>
<td> <asp:Label ID="Label16" runat="server" Text="Eng Typ"></asp:Label></td>
<td><asp:Label ID="Label17" runat="server" Text='<%# "Max: " + Eval("eng_typing_max_marks") %>'></asp:Label> </td>
<td><asp:Label ID="Label18" runat="server" Text='<%# "Obt: " + Eval("eng_typing_marks_obtained") %>'></asp:Label></td>
<td> <asp:Label ID="Label19" runat="server" Text='<%# "Per: " + Eval("eng_typing_percentage_rounded")+ " %" %>'></asp:Label></td>
</tr>
<tr>
<td> <asp:Label ID="Label20" runat="server" Text="Kan shorthand"></asp:Label></td>
<td><asp:Label ID="Label21" runat="server" Text='<%# "Max: " + Eval("kan_shorthand_max_marks") %>'></asp:Label> </td>
<td><asp:Label ID="Label22" runat="server" Text='<%# "Obt: " + Eval("kan_shorthand_max_marks") %>'></asp:Label></td>
<td> <asp:Label ID="Label23" runat="server" Text='<%# "Per: " + Eval("kan_shorthand_percentage_rounded")+ " %" %>'></asp:Label></td>
</tr>
<tr>
<td> <asp:Label ID="Label24" runat=&q




Responses

Posted by: Bandi on: 9/5/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
//This type of solution you want?
http://www.aspdotnet-suresh.com/2011/02/how-to-display-sum-of-columns-total-in.html

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Chaithragm, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response