@model IEnumerable<Html_Grid_MVC.Models.Customers>
@{
ViewBag.Title = "how to use Filterable,Sortable and WithPaging in MVC using GridMvc.";
}
@using GridMvc.Html
<h2>Index</h2>
<script src="~/Scripts/jquery-1.10.2.js"></script>
<link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/gridmvc.min.js")"></script>
<script src="~/bootstrap/js/bootstrap.min.js"></script>
<link href="~/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/Site.css" rel="stylesheet" />
<div class="container">
<div style="margin-top: 10px"></div>
<div class="logo col-sm-12 text-center col-md-12 ">
</div>
<div class="clearfix"></div>
<fieldset>
<legend class="legend">All Customers Detail</legend>
<div style="margin-top: 5px"></div>
<div class="test" style="overflow: scroll; height: auto; width: 600px">
<div style="width: 600px">
<div class="panel">
<div class="panel-body">
@Html.Grid(Model).Columns(columns =>
{
columns.Add(c => c.customerID).Titled("CustomerID").Filterable(true);
columns.Add(c => c.FirstName).Titled("FirstName").Filterable(true);
columns.Add(c => c.LastName).Titled("LastName").Filterable(true);
columns.Add(c => c.CreatedDate).Titled("CreatedDate").Filterable(true).Format("{0:dd/MM/yyyy}");
columns.Add(c => c.Address).Titled("Address").Filterable(true);
}).WithPaging(10).Sortable(true)
</div>
</div>
</div>
</div>
</fieldset>
</div>