Filter not working

Hi,

My filter doesn't work. The selections I make on the filter menu doesn't get applied to the grid. Here is my code:

var DataManager = new ej.data.DataManager({
        // url:        url,
        
        url:        URI + "api/cseldetail/list",
        crudUrl:    URI + "api/cseldetail/batch",
        // updateUrl:  URI + 'api/cseldetail/update',
        // insertUrl:  URI + 'api/cseldetail/insert',
        adaptor:    new ej.data.UrlAdaptor(),
        // offline: true,
        crossDomain: true
});


ej.grids.Grid.Inject(ej.grids.ColumnChooser);
ej.grids.Grid.Inject(ej.grids.ColumnMenu);
ej.grids.Grid.Inject(ej.grids.Edit);
ej.grids.Grid.Inject(ej.grids.ExcelExport);
ej.grids.Grid.Inject(ej.grids.Filter);
ej.grids.Grid.Inject(ej.grids.ForeignKey);
ej.grids.Grid.Inject(ej.grids.Group);
ej.grids.Grid.Inject(ej.grids.Page);
ej.grids.Grid.Inject(ej.grids.Reorder);
ej.grids.Grid.Inject(ej.grids.Resize);
ej.grids.Grid.Inject(ej.grids.RowDD);
ej.grids.Grid.Inject(ej.grids.Search);
ej.grids.Grid.Inject(ej.grids.Selection);
ej.grids.Grid.Inject(ej.grids.Sort);
ej.grids.Grid.Inject(ej.grids.Toolbar);



var grid = new ej.grids.Grid({
    dataSource: DataManager,
    query: new ej.data.Query().addParams('username'username).addParams('csel_headers_id'header_id),
    // enablePersistence: true,
    allowPaging: true,
    pageSettings: {pageSizes: ['20''50','All']},
    allowSelection: true,
    selectionSettings: { type: 'Multiple' },
    allowResizing: true,
    isResponsive: true,
    allowSorting: true,
    allowMultiSorting: true,
    allowFiltering: true,
    filterSettings: { type: 'Excel' },
    allowGrouping: true,
    allowReordering: true,
    showColumnChooser: true,
    showColumnMenu: true,
    allowExcelExport: true,
    allowRowDragAndDrop: true,
    height: 700,
    rowHeight: 25,
    enableAutoFill: true,
    groupSettings: { 
        columns: ['csel_options_categories_id'],
        showGroupedColumn: false
    },
    editSettings: { 
        allowEditing: true,
        allowAdding: true,
        mode: 'Batch',
        newRowPosition:'Top'
    },
    sortSettings: {
        columns: [
            { field: 'csel_options_categories_id'direction: 'Ascending' },
            { field: 'order'direction: 'Ascending' }
        ]
    },
    contextMenuItems: [
        'AutoFit''AutoFitAll''SortAscending''SortDescending',
            'Copy''Edit''Save''Cancel','FirstPage''PrevPage''LastPage''NextPage'
    ],

    
    toolbar: ['Add''Edit''Update''Cancel''ColumnChooser''ExcelExport''Search'],

1 Reply 1 reply marked as answer

TS Thiyagu Subramani Syncfusion Team July 9, 2020 09:06 AM UTC

Hi Christian , 

Thanks for contacting Syncfusion support. 

Based on your query the filtering is not working fine in the Grid. We have prepared an sample with your code example and filtering is working fine in our sample. 

For your convenience we have attached the sample and please download the sample from the following link  


Screenshot: 

Before filtering is applied: 

 

After filtering is applied: 

 

To find out the root cause of an issue, we need the following details 

1. Have you faced any script error while apply filtering on the Grid? If yes, share the screenshot and stackrace of an script error. 

2. Did you face filtering issue anyone particular type column(integer, string, date etc.,)  or in all columns? 

3. Share the video demonstration of an issue. 

4. In your code example we found that you have used URL Adaptor, so please share the server side code. 

5. If possible, replicate the issue in the attached sample. 


Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S. 


Marked as answer
Loader.
Up arrow icon