Skip to content

Instantly share code, notes, and snippets.

@gnutix
Created August 21, 2020 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnutix/5872b21f98993b1e01a37f199d927359 to your computer and use it in GitHub Desktop.
Save gnutix/5872b21f98993b1e01a37f199d927359 to your computer and use it in GitHub Desktop.
$(function() {
var db = DevExpress.data.AspNet.createStore({
key: "ID",
loadUrl: '/my/route/endpoint'
});
$("#gridContainer").dxDataGrid({
dataSource: {
store: db
},
height: "100%",
columns: [
{
dataField: "ID",
dataType: "number",
allowEditing: false
},
{
dataField: "Label"
},
{
dataField: "Status"
},
{
dataField: "CreatedAt",
dataType: "date"
}
],
groupPanel: {
visible: true
},
sorting: {
mode: "multiple"
},
searchPanel: {
visible: true
},
scrolling: {
mode: "virtual"
},
filterRow: {
visible: true
},
editing: {
mode: "batch",
allowAdding: true,
allowUpdating: true,
allowDeleting: true
},
grouping: {
autoExpandAll: false
},
pager: {
showPageSizeSelector: true,
showInfo: true
},
summary: {
totalItems: [
{
column: "ID",
summaryType: "sum"
},
{
column: "ID",
summaryType: "avg"
},
{
column: "ID",
summaryType: "min"
},
{
column: "ID",
summaryType: "max"
}
],
groupItems: [
{
summaryType: "count"
},
{
column: "ID",
summaryType: "min"
},
{
column: "ID",
summaryType: "max"
}
]
},
remoteOperations: {
filtering: true,
grouping: true,
groupPaging: true,
paging: true,
sorting: true,
summary: true
},
headerFilter: {
visible: true
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment