ASP .NET Core MVC Documentation
Getting Started
jqxDataTable represents a UI component which displays a data-bound table with editing, sorting, filtering and grouping capabilities.Every ASP .NET Core Mvc Tag Helper from jQWidgets toolkit needs its JavaScript files to be included in order to work properly.
Include all required javascript and css files
jqxDataTable requires the following files:
CSS
jqx.base.css
Javascript
jqxcore.js
jqxbuttons.js
jqxscrollbar.js
jqxlistbox.js
jqxdropdownlist.js
jqxmenu.js
jqxdata.js
jqxdata.export.js
jqxdatatable.js
To call a function(method), you need to pass the method name and parameters(if any) in the UI component’s instance.<script src="~/jqwidgets/jqxbuttons.js"></script>
<script src="~/jqwidgets/jqxdatatable.js"></script>
<script src="~/jqwidgets/jqxscrollbar.js"></script>
<script src="~/jqwidgets/jqxmenu.js"></script>
<script src="~/jqwidgets/jqxlistbox.js"></script>
<script src="~/jqwidgets/jqxdropdownlist.js"></script>
@model IEnumerable<jQWidgets.AspNet.Core.Models.Employee>
@{
string renderer = "function() {}';
string rendering = "function() {}';string pagerRenderer = "function(element) {}';string renderToolbar = "function(element) {}';string renderStatusbar = "function(element) {}';string aggregatesRenderer = "function(element){}'string exportSettings = '{columnsHeader: true,hiddenColumns: false,serverURL: null,characterSet: null,collapsedRecords: false,recordsInView: true,fileName: "jqxDataTable"}';string editSettings = '{saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true}';}<jqx-data-table alt-rows="true" width="850" source="Model"><jqx-data-table-columns><jqx-data-table-column column-group="name" dataField="FirstName" width="100" text="First Name"></jqx-data-table-column><jqx-data-table-column column-group="name" dataField="LastName" width="100" text="Last Name"></jqx-data-table-column><jqx-data-table-column dataField="Title" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Address" width="200"></jqx-data-table-column><jqx-data-table-column dataField="City" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Country"></jqx-data-table-column></jqx-data-table-columns><jqx-data-table-column-groups><jqx-data-table-column-group name="name" text="Name"></jqx-data-table-column-group></jqx-data-table-column-groups></jqx-data-table>
To bind to an event of a UI Component, you can use<script src="~/jqwidgets/jqxbuttons.js"></script>
<script src="~/jqwidgets/jqxdatatable.js"></script>
<script src="~/jqwidgets/jqxscrollbar.js"></script>
<script src="~/jqwidgets/jqxmenu.js"></script>
<script src="~/jqwidgets/jqxlistbox.js"></script>
<script src="~/jqwidgets/jqxdropdownlist.js"></script>
@model IEnumerable<jQWidgets.AspNet.Core.Models.Employee>
@{
string renderer = "function() {}';
string rendering = "function() {}';string pagerRenderer = "function(element) {}';string renderToolbar = "function(element) {}';string renderStatusbar = "function(element) {}';string aggregatesRenderer = "function(element){}'string exportSettings = '{columnsHeader: true,hiddenColumns: false,serverURL: null,characterSet: null,collapsedRecords: false,recordsInView: true,fileName: "jqxDataTable"}';string editSettings = '{saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true}';}<jqx-data-table width="850" source="Model" instance="getInstance()"><jqx-data-table-columns><jqx-data-table-column column-group="name" dataField="FirstName" width="100" text="First Name"></jqx-data-table-column><jqx-data-table-column column-group="name" dataField="LastName" width="100" text="Last Name"></jqx-data-table-column><jqx-data-table-column dataField="Title" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Address" width="200"></jqx-data-table-column><jqx-data-table-column dataField="City" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Country"></jqx-data-table-column></jqx-data-table-columns><jqx-data-table-column-groups><jqx-data-table-column-group name="name" text="Name"></jqx-data-table-column-group></jqx-data-table-column-groups></jqx-data-table>@section scripts {<script type="text/javascript">function getInstance(instance) {instance["beginCellEdit"](10,'firstName');}</script>}
on-event-type
syntax. The example
code below demonstrates how to bind to an event.
<script src="~/jqwidgets/jqxbuttons.js"></script>
<script src="~/jqwidgets/jqxdatatable.js"></script>
<script src="~/jqwidgets/jqxscrollbar.js"></script>
<script src="~/jqwidgets/jqxmenu.js"></script>
<script src="~/jqwidgets/jqxlistbox.js"></script>
<script src="~/jqwidgets/jqxdropdownlist.js"></script>
@model IEnumerable<jQWidgets.AspNet.Core.Models.Employee>
@{
string renderer = "function() {}';
string rendering = "function() {}';string pagerRenderer = "function(element) {}';string renderToolbar = "function(element) {}';string renderStatusbar = "function(element) {}';string aggregatesRenderer = "function(element){}'string exportSettings = '{columnsHeader: true,hiddenColumns: false,serverURL: null,characterSet: null,collapsedRecords: false,recordsInView: true,fileName: "jqxDataTable"}';string editSettings = '{saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true}';}<jqx-data-table on-binding-complete="eventHandler()"><jqx-data-table-columns><jqx-data-table-column column-group="name" dataField="FirstName" width="100" text="First Name"></jqx-data-table-column><jqx-data-table-column column-group="name" dataField="LastName" width="100" text="Last Name"></jqx-data-table-column><jqx-data-table-column dataField="Title" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Address" width="200"></jqx-data-table-column><jqx-data-table-column dataField="City" width="150"></jqx-data-table-column><jqx-data-table-column dataField="Country"></jqx-data-table-column></jqx-data-table-columns><jqx-data-table-column-groups><jqx-data-table-column-group name="name" text="Name"></jqx-data-table-column-group></jqx-data-table-column-groups></jqx-data-table>@section scripts {<script type="text/javascript">function eventHandler(event) {}</script>}