WebAPIDataGrid 1.4.3
dotnet add package WebAPIDataGrid --version 1.4.3
NuGet\Install-Package WebAPIDataGrid -Version 1.4.3
<PackageReference Include="WebAPIDataGrid" Version="1.4.3" />
paket add WebAPIDataGrid --version 1.4.3
#r "nuget: WebAPIDataGrid, 1.4.3"
// Install WebAPIDataGrid as a Cake Addin #addin nuget:?package=WebAPIDataGrid&version=1.4.3 // Install WebAPIDataGrid as a Cake Tool #tool nuget:?package=WebAPIDataGrid&version=1.4.3
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"
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
$("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)
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 (>= 1.0.7)
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,255 | 4/28/2017 |
1.4.2 | 1,025 | 10/5/2016 |
1.4.1 | 1,172 | 9/21/2016 |
1.4.0 | 932 | 9/11/2016 |
1.3.9 | 935 | 9/11/2016 |
1.3.8 | 931 | 9/11/2016 |
1.3.7 | 1,495 | 9/11/2016 |
1.3.6 | 1,206 | 9/9/2016 |
1.3.5 | 950 | 9/9/2016 |
1.3.4 | 975 | 9/9/2016 |
1.3.3 | 1,203 | 9/9/2016 |
1.3.2 | 973 | 9/5/2016 |
1.3.0 | 969 | 9/5/2016 |
1.2.0 | 1,180 | 9/4/2016 |
1.1.0 | 1,104 | 9/4/2016 |
1.0.0 | 1,208 | 9/4/2016 |