Using JSON as a data source

Docs

DbNetGridCore also supports JSON as a data source either as a file or a string. Presentation of JSON data is enhanced when accompanied by optional type information. The JSON data source type is only suitable for JSON that is can be directly converted to an array of objects. If you need to pre-process the JSON you can use the List data source type which will allow you to deserialise the JSON and convert to a List of typed objects

Razor
                                
                                        
DbNetGridCore employeesGrid = new DbNetGridCore(DataSourceType.JSON, "/data/employees.json", typeof(Employee));
employeesGrid.Column(new string[] { nameof(Employee.Gender), nameof(Employee.DepartmentName), nameof(Employee.Status) }).Lookup();
employeesGrid.Columns = new List() {
    nameof(Employee.EmployeeKey),
    nameof(Employee.LastName),
    nameof(Employee.FirstName),
    nameof(Employee.NameStyle),
    nameof(Employee.Title),
    nameof(Employee.HireDate),
    nameof(Employee.BirthDate),
    nameof(Employee.EmailAddress),
    nameof(Employee.Phone),
    nameof(Employee.MaritalStatus),
    nameof(Employee.SalariedFlag),
    nameof(Employee.Gender),
    nameof(Employee.PayFrequency),
    nameof(Employee.BaseRate),
    nameof(Employee.VacationHours),
    nameof(Employee.SickLeaveHours),
    nameof(Employee.DepartmentName),
    nameof(Employee.StartDate),
    nameof(Employee.EndDate),
    nameof(Employee.Status)
    };
employeesGrid.Column("*").Filter();
employeesGrid.View = true;
employeesGrid.ViewLayoutColumns = 2;
employeesGrid.Column(nameof(Employee.EmployeeKey)).PrimaryKey();
@employeesGrid.Render()