WebAPIDataGrid 1.3.7
See the version list below for details.
dotnet add package WebAPIDataGrid --version 1.3.7
NuGet\Install-Package WebAPIDataGrid -Version 1.3.7
<PackageReference Include="WebAPIDataGrid" Version="1.3.7" />
paket add WebAPIDataGrid --version 1.3.7
#r "nuget: WebAPIDataGrid, 1.3.7"
// Install WebAPIDataGrid as a Cake Addin
#addin nuget:?package=WebAPIDataGrid&version=1.3.7
// Install WebAPIDataGrid as a Cake Tool
#tool nuget:?package=WebAPIDataGrid&version=1.3.7
A data grid to display the data retrieved from webapi or a rest service.
The grid will display data for any entity.You just need to call the GetValues method on html table as:
$("tblEmployees").GetValues(({ URL: "/api/values1/",IdColumn: "RollNo"}); .URL is the URL of the REST service.IdColumn is the column that uniquely identifies an entity
To use the grid and display the data on a page
1.include the follwing js and css in the web page
<script src="../Scripts/WebGrid.js" type="text/javascript"></script>
<link href="../Content/GridStyle.css" rel="stylesheet" />
Grid control also uses jquery ,so also reference the jquery library on the page.
2.Declare html table on the page
3.Call the GetValues method on the declared table
$(document).ready(
function () {
$("IdOfTable").GetValues({
URL: "/api/ControllerName/",
IdColumn: "NameofPrimaryKeyColumn"
});
}
);
4.Add the following attribute to the Controller class
[WebGrid.PagingAttribute(EntityId = "AnyIdentifier", PageSize = SizeOfPage, EntityType = typeof(TypeOfEntity))]
For example below will display the data for students in a grid
[WebGrid.PagingAttribute(EntityId = "Students", PageSize = 10, EntityType = typeof(Student))]
5.Derive the controller class from the CustomController class.
You can also sort the displayed data by clicking the grid column headers
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- jQuery (>= 1.8.0)
- System.Linq.Dynamic
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.3 | 1,238 | 4/28/2017 |
1.4.2 | 1,020 | 10/5/2016 |
1.4.1 | 1,164 | 9/21/2016 |
1.4.0 | 928 | 9/11/2016 |
1.3.9 | 930 | 9/11/2016 |
1.3.8 | 927 | 9/11/2016 |
1.3.7 | 1,490 | 9/11/2016 |
1.3.6 | 1,202 | 9/9/2016 |
1.3.5 | 946 | 9/9/2016 |
1.3.4 | 972 | 9/9/2016 |
1.3.3 | 1,200 | 9/9/2016 |
1.3.2 | 969 | 9/5/2016 |
1.3.0 | 964 | 9/5/2016 |
1.2.0 | 1,174 | 9/4/2016 |
1.1.0 | 1,100 | 9/4/2016 |
1.0.0 | 1,201 | 9/4/2016 |