Datagrid Filter Column not showing result

Hello,

I have a grid that use filter, pagination and datamanager, all's good except on column filter it won't show anything even though the url returning response. 

please see attached is my code and the preview of the problem


Attachment: Syncfusion_88f60c8e.zip

4 Replies 1 reply marked as answer

RY Ryan January 1, 2026 06:24 PM UTC

case filtering 'Customer' still not showing results on Dialog Column Filter


Attachment: Filter_1ec0ebae.zip


SI Santhosh Iruthayaraj Syncfusion Team January 2, 2026 12:13 PM UTC

Hi Ryan,


Greetings from Syncfusion Support.


We have reviewed the provided video and understand that you are experiencing an issue with the Excel Filter Search. Based on the shared code, we observed that you are using both DataManager with UrlAdaptor and the dataStateChange event in the same Grid. Because of this, we are unable to confirm which data binding approach you are currently using and where the issue occurs.


To assist you, we have analyzed both scenarios and prepared solutions for both data binding methods and included code snippets and a sample for your reference.


DataManager with UrlAdaptor:


If you are using DataManager with UrlAdaptor, the issue may be due to the filtering action not being handled correctly on the server side. We have provided a proper server-side implementation for filtering with UrlAdaptor below:


[CoreGridApp\Controllers\HomeController.cs]


        [
HttpPost]

        public IActionResult CustomersDataSource([FromBody] DataManagerRequest dm)

        {

            IEnumerable data = Customers;

            DataOperations operation = new DataOperations();

            if (dm == null)

            {

                return Json(data);

            }

            if (dm.Search != null && dm.Search.Count > 0)

            {

                data = operation.PerformSearching(data, dm.Search);

            }

            if (dm.Sorted != null && dm.Sorted.Count > 0)

            {

                data = operation.PerformSorting(data, dm.Sorted);

            }

            if (dm.Where != null && dm.Where.Count > 0)

            {

                data = operation.PerformFiltering(data, dm.Where, dm.Where[0].Operator);

            }

            int count = data.Cast<CustomerDetail>().Count();

            if (dm.Skip != 0)

            {

                data = operation.PerformSkip(data, dm.Skip);

            }

            if (dm.Take != 0)

            {

                data = operation.PerformTake(data, dm.Take);

            }

            return dm.RequiresCounts ? Json(new { result = data, count }) : Json(data);

        }

 


Note: Make sure the returned response is also in the proper format based on the “RequiresCounts”  property.


Custom Binding (dataStateChange event):


If you are using Custom Binding, the issue may be related to the logic in the applyFiltering method. The current implementation is designed for Filter Bar type filters. Since you are using Excel Filter, you need to update the logic to handle complex Excel Filter predicates correctly. Please find the updated applyFiltering method below:


[CoreGridApp\Views\Home\Index.cshtml]

 

    const applyFiltering = (query, filter) => {

        const combinePredicates = (predicates, condition = 'and') =>

            predicates.reduce((acc, curr) => (acc ? (condition === 'or' ? acc.or(curr) : acc.and(curr)) : curr), null);

        const buildPredicate = (node) => {

            if (!node) return null;

            if (Array.isArray(node)) {

                const predicates = node.map(buildPredicate).filter(Boolean);

                return combinePredicates(predicates);

            }

            if (node.isComplex) {

                const predicates = (node.predicates || []).map(buildPredicate).filter(Boolean);

                return combinePredicates(predicates, (node.condition || 'and').toLowerCase());

            }

            if (node.field && node.operator) {

                const ignoreCase = node.ignoreCase !== undefined ? node.ignoreCase : true;

                return new ej.data.Predicate(node.field, node.operator, node.value, ignoreCase, node.ignoreAccent, node.matchCase);

            }

            return null;

        };

        const predicate = buildPredicate(filter);

        if (predicate) {

            query.where(predicate);

        }

    };

 


We have attached a working sample that demonstrates both solutions for your reference.


Please let us know if you need any further assistance.


Regards,

Santhosh I


Attachment: CoreGridApp_f0965584.zip

Marked as answer

RY Ryan January 2, 2026 01:15 PM UTC

Thank you !

This fixed it for me: 
            return dm.RequiresCounts ? Json(new { result = data, count }) : Json(data);



SI Santhosh Iruthayaraj Syncfusion Team January 5, 2026 03:13 AM UTC

Hi Ryan,


We are glad to hear that the provided solution helped. Feel free to reach out to us if you need any further assistance.


Regards,

Santhosh I


Loader.
Up arrow icon