title: How to show Sum of Columns Grid.Mvc List
body: <p>I'm new at asp.net and trying to understand mvc principles. I have a Grid.MVC based list which allows me to create a sortable, filterable, paged list.</p>
  
  <p>My problem is, I want to add footer for my columns to show the sum of the values at column. I have examined documentation of Grid.Mvc but I couldn't find anyway to make it.</p>
  
  <pre><code>model IEnumerable&lt;Finalizor.Models.Server&gt;
  
  
  @using GridMvc.Html
  @{
      ViewBag.Title = "Index";
  }
  @{
      Layout = null;
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  &lt;link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" /&gt;
  &lt;link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" /&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/gridmvc.min.js")"&gt;&lt;/script&gt;
  
  &lt;div class="code-cut"&gt;
      @Html.Grid(Model).Columns(columns =&gt;
                      {
                          columns.Add(c =&gt; c.Name).Titled("Name").Filterable(true);
                          columns.Add(c =&gt; c.Surname).Titled("Surname").Filterable(true);
                          columns.Add(c =&gt; c.Job).Titled("Job").Filterable(true);
                          columns.Add(c =&gt; c.Salary).Titled("Salary").Filterable(true);
                          columns.Add(c =&gt; c.Department).Titled("Department").Filterable(true);
                          columns.Add()
                          .Encoded(false)
                          .Sanitized(false)
                          .SetWidth(30)
                          .RenderValueAs(o =&gt; Html.ActionLink("Edit", "Edit", new { id = o.PersonalID }));
  
                      }).WithPaging(10).Sortable(true).WithGridItemsCount("Total Personal")
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my view, very simple I think. For example, I need to filter staff according to their departments and jobs, I can do this until this point but also I have to see sum of their salaries at the end of salary column. But not all the personal, only the staff that I've filtered, so I mean staff on the list after filtering.</p>
  
  <p>Grid.MVC has a sample project very much like this <a href="http://gridmvc.azurewebsites.net/?grid-page=3" rel="nofollow">here</a></p>
  
  <p>I think there's a way maybe they've specified at their code but I don't know where.</p>
  
  <p><a href="https://github.com/leniel/Grid.Mvc/blob/master/GridMvc" rel="nofollow">https://github.com/leniel/Grid.Mvc/blob/master/GridMvc</a></p>
  
  <p>Thanks for any help!</p>