UNPKG

jqwidgets-framework

Version:

jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.

48 lines (47 loc) 1.97 kB
@{ ViewBag.Title = "jQWidgets Data Grid"; } @section scripts { <script type="text/javascript"> $(document).ready(function () { // prepare the data var source = { datatype: "json", datafields: [ { name: 'EmployeeID', type: 'number' }, { name: 'ManagerID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Country', type: 'string' }, { name: 'City', type: 'string' }, { name: 'Address', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'HireDate', type: 'date' }, { name: 'BirthDate', type: 'date' } ], id: 'EmployeeID', url: '/Employee/GetEmployees' }; var dataAdapter = new $.jqx.dataAdapter(source); $("#grid").jqxGrid( { width: 850, height: 250, source: dataAdapter, sortable: true, columns: [ { text: 'FirstName', dataField: 'FirstName', width: 200 }, { text: 'LastName', dataField: 'LastName', width: 200 }, { text: 'Title', dataField: 'Title', width: 160 }, { text: 'Birth Date', dataField: 'BirthDate', cellsformat: 'd', width: 120 }, { text: 'Hire Date', dataField: 'HireDate', cellsformat: 'd', width: 120 }, { text: 'Address', dataField: 'Address', width: 250 }, { text: 'City', dataField: 'City', width: 120 }, { text: 'Country', dataField: 'Country' } ] }); }); </script> } <div id="grid"></div>