In my project i try to add grid but its showing following error 'HtmlHelper>' does not contain a definition for 'Grid' and the best extension method overload 'MvcGridExtensions.Grid(IHtmlHelper, IEnumerable)' requires a receiver of type 'IHtmlHelper'
Code:
@model IEnumerable<SCM_MVC.Models.XXXXX>
@using NonFactors.Mvc.Grid;
@(Html
.Grid(Model)
.Build(columns =>
{
columns.Add(model => model.select).Titled("Name");
columns.Add(model => model.Surname).Titled("Surname");
columns.Add(model => model.MaritalStatus).Titled("Marital status");
columns.Add(model => model.Age).Titled("Age");
columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}");
columns.Add(model => model.IsWorking).Titled("Employed");
})
.Empty("No data found")
.Filterable()
.Sortable()
.Pageable()
)
What am doing wrong here?