Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefh/kendogridbinderex
This is a ModelBinder designed to consume an http request and build a json serializable object for the Kendo UI Grid datasource. AutoMapper is used to support mapping from ViewModel <> Entity.
https://github.com/stefh/kendogridbinderex
automapper binder dynamic grid kendo-ui
Last synced: 3 months ago
JSON representation
This is a ModelBinder designed to consume an http request and build a json serializable object for the Kendo UI Grid datasource. AutoMapper is used to support mapping from ViewModel <> Entity.
- Host: GitHub
- URL: https://github.com/stefh/kendogridbinderex
- Owner: StefH
- License: mit
- Created: 2012-10-27T10:38:36.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2023-10-31T08:30:00.000Z (about 1 year ago)
- Last Synced: 2024-04-14T13:08:21.382Z (9 months ago)
- Topics: automapper, binder, dynamic, grid, kendo-ui
- Language: C#
- Homepage:
- Size: 26.4 MB
- Stars: 54
- Watchers: 25
- Forks: 24
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Information on NuGet
In February 2022 Progress Software Corporation ("PSC") has obtained from NuGet Prefix reservations for a number of its trademarks/product names, including Kendo.
Since my NuGet packages use the "Kendo" prefix, PSC is hereby requesting that I either rename the package in a way that makes it clear to consumers that this is not a Progress Software Corporation product or delist the package from the nuget.org site altogether.
So for now (February 2022) I decided to unlist the NuGet.
When I have time, I'll create new NuGet packages. Probably like:
- GridBinder.for.Kendo (rather than KendoGridBinder)
- GridBinderEx.for.Kendo (rather than KendoGridBinderEx)
- GridBinder.AspNetCore.for.Kendo (rather than KendoGridBinder.AspNetCore)Kind regards,
Stef Heyenrath# KendoGridBinder
[![Build status](https://ci.appveyor.com/api/projects/status/6ynbga07r315xhb8?svg=true)](https://ci.appveyor.com/project/StefH/kendogridbinderex)
## Versions
| NuGet | Frameworks | NuGet |
| - | - | - |
| KendoGridBinder | .NET 4.5 | [![NuGet Badge](https://buildstats.info/nuget/KendoGridBinder)](https://www.nuget.org/packages/KendoGridBinder)
| KendoGridBinder.AspNetCore | .NET 4.6.1
NETStandard 1.6
NETStandard 2.0 | [![NuGet Badge](https://buildstats.info/nuget/KendoGridBinder.AspNetCore)](https://www.nuget.org/packages/KendoGridBinder.AspNetCore)## Demo
A live demo can be found [here](https://kendogridbinderex.azurewebsites.net).### Action Method
```csharp
[HttpPost]
public JsonResult Grid(KendoGridMvcRequest request)
{
var employees = new List
{
new Employee { EmployeeId = 1, FirstName = "Bill", LastName = "Jones", Email = "[email protected]" },
new Employee { EmployeeId = 2, FirstName = "Rob", LastName = "Johnson", Email = "[email protected]" },
new Employee { EmployeeId = 3, FirstName = "Jane", LastName = "Smith", Email = "[email protected]" }
};var grid = new KendoGridEx(request, employees.AsQueryable());
return Json(grid);
}
```### HTML
```html
```### Script
```javascriptvar url = '@Url.Action("Grid")';
var dataSource = {
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 20,
transport: {
read: {
type: 'post',
dataType: 'json',
url: url
}
},
schema: {
data: 'Data',
total: 'Total',
model: {
id: 'Id',
fields: {
FirstName: { type: 'string' },
LastName: { type: 'string' },
Email: { type: 'string' }
}
}
}
};$('#grid').kendoGrid({
dataSource: dataSource,
height: 400,
columns: [
{ field: 'FirstName', title: 'First Name' },
{ field: 'LastName', title: 'Last Name' },
{ field: 'Email' }
],
filterable: true,
sortable: true,
pageable: true
});```