Name | Surname | Marital status | Age | Birthday | Employed |
---|---|---|---|---|---|
Joe | Crosswave | Married | 32 | 1/5/1992 | False |
Merry | Lisel | Widowed | 42 | 5/6/1982 | |
Henry | Crux | Single | 30 | 11/19/1994 | True |
Cody | Jurut | 50 | 8/11/1974 | False |
new MvcGrid(document.querySelector(".mvc-grid"), {
url: "IndexGrid", // Grid source url string.
query: "search=test", // Grid query string.
filters: {
// Grid filter constructors to extend or use.
"default": CustomDefaultFilter
"person": PeopleFilter
},
loadingDelay: 300 // Loading block visiblity delay on ajax grid, null - no loading screen.
});
// Any element inside the grid structure, .mvc-grid, table, tr, td, etc.
const element = document.querySelector(".mvc-grid");
// Initializes new or returns an existing grid's instance with applied options.
const grid = new MvcGrid(element[, { /* options */ }]);
// Reloads the grid.
grid.reload();
// Updates current grid options.
grid.set({ /* options */ });
// Get current grid configuration.
grid.getConfiguration();
// Show grid configuration popup with an optional anchor element.
grid.showConfiguration([anchor = null]);