Hi
In below code i want to display sum of Budget Amount in Footer
if (Result != null) { htmlTable.Append("<table class='table table-striped table-hover dataTable table-bordered' data-provide='data-table' id='tbldata'>"); htmlTable.Append("<thead><tr><th>#</th><th>Year</th><th><th>Department</th><th style='text-align:right'>Budget Amount</th></tr></thead>"); htmlTable.Append("<tbody>"); foreach (var colum in Result) { rownum++; htmlTable.Append("<tr>"); htmlTable.Append("<td class='ID'>" + rownum + " <span style='display:none'>" + colum.BudgetID + "</span></td>"); htmlTable.Append("<td>" + colum.BusinessYear + "</td>"); //htmlTable.Append("<td>" + colum.Department + "</td>"); htmlTable.Append("<td style='text-align:right'>" + Convert.ToDecimal(colum.BudgetAmount).ToString("0,0", System.Globalization.CultureInfo.CreateSpecificCulture("hi-IN")) + "</td>");
htmlTable.Append("</tr>"); } htmlTable.Append("</tbody>"); htmlTable.Append("</table>"); PlaceHolder1.Controls.Add(new Literal { Text = htmlTable.ToString() }); }
Thanks