jQuery UI Widgets Forums DataTable Filter doesn't work

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Filter doesn't work #61649

    moanesibrahim
    Participant

    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.0

    Can you please help me to understand why the filter stopped working? and what possible issues that make it stops?
    Thanks
    Mo

    Please 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 }
                    ]
                });
            });
    Filter doesn't work #61652

    Dimitar
    Participant

    Hello moanesibrahim,

    Please check out the demo Server Filtering to see how to implement this feature correctly.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.