jQuery UI Widgets › Forums › DataTable › Filter doesn't work
Tagged: asp.net, datatable, filter, filtering, jqxdatatable, MVC, MVC5, server, server-side
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 9 years, 11 months ago.
-
AuthorFilter doesn't work Posts
-
I just started using JQWidjets gqxDataTable with my ASP.NET MVC5, everything was working perfect however all of a sudden I fond that the filter is no longer working (either the advanced or the simple)
I am using jquery-1.10.2, Visual Studio 2013 and ASP.NET MVC5 along with JQWidgets 3.5.0Can you please help me to understand why the filter stopped working? and what possible issues that make it stops?
Thanks
MoPlease look at the code below
@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' }, { name: 'DepartmentId', type: 'number' }, { name: 'DepartmentName', type: 'string' } ], id: 'EmployeeID', url: '/Employee/GetEmployees' }; var dataAdapter = new $.jqx.dataAdapter(source); // create Tree Grid $("#dataTable").jqxDataTable( { width: 1250, source: dataAdapter, serverProcessing: true, theme: 'arctic', pageSize: 7, sortable: true, //altrows: true, filterable:true, filterMode:'advanced', pageable: true, pagerMode: 'advanced', pagerButtonsCount: 10, columnsResize: true, groups: ['Country'], groupsRenderer: function (value, rowData, level) { return "Country: " + value; }, columns: [ { text: 'First Name', dataField: 'FirstName', width: 200,filterable:true }, { text: 'Last Name', 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', width: 85 }, { text: 'Department Id', dataField: 'DepartmentId', width: 160 }, { text: 'Department Name', dataField: 'DepartmentName', width: 200 } ] }); });
Hello moanesibrahim,
Please check out the demo Server Filtering to see how to implement this feature correctly.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.