I am using Nonfactors.Grid.Mvc(6.2.4)
and trying to show data in table. I have also included styles
and js
file in layout as well,
But data is not showing , even table is now showing.
View
@using NonFactors.Mvc.Grid
@model IQueryable<Student>
@{
ViewBag.Title = "Students List";
}
<div class="panel">
<div class="panel-body">
@(Html
.Grid(Model)
.Build(columns =>
{
columns.Add(model => model.Name).Titled("Name");
columns.Add(model => model.Address).Titled("Surname");
columns.Add(model => model.Email).Titled("Marital status");
columns.Add(model => model.GPA).Titled("Age");
columns.Add(model => model.Major).Titled("Birthday");
columns.Add(model => model.Minor).Titled("Employed");
})
.Empty("No data found")
.Filterable()
.Sortable()
.Pageable()
)
</div>
Controller method
[HttpGet]
public ViewResult LoadStudents()
{
List<Student> students = (from Student in this.Context.Students
select Student).ToList();
var queryable = students.AsQueryable();// i debug and see data is populating in this
return View(Context.Set<Student>());
}
I also use inspect element and check console errors but no error showing as well. I have install gridmvc through package manager. No error showing, even build successfully but no data is showing,