Our blazing fast Grid component built with pure JavaScript


Post by notepads »

My url with parameters like this. I send page and pageSize to the backend and get the data according to that. But how do I filter? when I put filter keyword, it doesn't work. How can I make filter working?

https://localhost:4148/api/job/management?page=1&pageSize=25

$scope.initilalizeGrid = function () {

        let
            rowCount = bryntum.grid.BrowserHelper.searchParam('rowCount') || 250,
            pageSize = bryntum.grid.BrowserHelper.searchParam('pageSize') || 25,
            minCount = 10,
            maxCount = 500,
            currentPage = 1,
            data = [];

        store = new bryntum.grid.AjaxStore({
            readUrl: '/api/job/management',
            pageParamName: 'page',
            sortParamName: 'sort',
            filterParamName: 'filter',
            pageSize: pageSize,
            autoLoad: true,
        });

        let jobGrid = new bryntum.grid.Grid({
            ref: 'jobGrid',
            appendTo: 'jobGridTable',
            //eventStore: jobGridScheduler.eventStore,
            //store: {
            //    modelClass: Task,
            //    readUrl: "api/order/management",
            //    autoLoad: true,
            //},
            store,
            //data: $scope.availableOrders,
            rowHeight: 35,
            height: 500,
            features: {
                group: true,
                //filterBar: true,
                stripe: true,
                filter: true,
                quickFind: true,
                search: true,
                sort: new Date(),
                columnPicker: true,
            },


            //api/order/management
            columns: $scope.gridColumns,
        });

Post by alex.l »

Hi notepads,

Take a look at this example. It uses pagination with filtering, totally that you need here: https://www.bryntum.com/examples/grid/paged/

All best,
Alex

All the best,
Alex


Post by notepads »

alex.l wrote: Mon Aug 10, 2020 8:45 am

Hi notepads,

Take a look at this example. It uses pagination with filtering, totally that you need here: https://www.bryntum.com/examples/grid/paged/

All best,
Alex

I know but try to group it on the example. It doesn't work. The example provided has malfunctioning grouping. Filter is working but I don't know how to do it with the backend. How do I get the filtername and filter value so I can fetch that to the backend and sort it out.


Post by notepads »

notepads wrote: Mon Aug 10, 2020 9:37 pm
alex.l wrote: Mon Aug 10, 2020 8:45 am

Hi notepads,

Take a look at this example. It uses pagination with filtering, totally that you need here: https://www.bryntum.com/examples/grid/paged/

All best,
Alex

I know but try to group it on the example. It doesn't work. The example provided has malfunctioning grouping. Filter is working on the example.
Questions here.
When i fetch data, do I fetch 300 rows and then it will automatically page, size, sort and filter?
Or do i have to make backend having filter page and pagesize as parameters?


Post by alex.l »

Ho notepads,

We currently do not support remote grouping, here is a feature request: https://github.com/bryntum/support/issues/1306
Yes, you need to handle data (filter, split on pages, etc) on your backend using params that passed from the frontend.

All best,
Alex

All the best,
Alex


Post by Maxim Gorkovsky »

You can refer to filters using corresponding property on the store: https://www.bryntum.com/docs/grid/#Core/data/mixin/StoreFilter#property-filters
This is a collection of records: https://www.bryntum.com/docs/grid/#Core/util/CollectionFilter


Post Reply