We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom filter (Excel)

Thread ID:





130834 Jun 6,2017 01:22 PM UTC Jun 7,2017 10:23 AM UTC Angular 1
Tags: ejGrid
Asked On June 6, 2017 01:22 PM UTC


Trying to implement Excel filtering and almost evertyhing works fine apart suggestions in custom filter textfield. My current return format from backend for grid (json) is:
{ result: [{}, {}, {} ..], count: 0 } - I see that by my request, I do return those records, but suggestion list can't find anything. Do I need different return format? If yes, how do I know which format to return when it's for Grid and Suggestions list? When I stop typing in textfield, it makes this request:

Jayaprakash Kamaraj [Syncfusion]
Replied On June 7, 2017 10:23 AM UTC

Hi Customer, 

Thank you for contacting Syncfusion support. 

To overcome this problem, we suggest you to return records alone in server side when dm.RequiresCounts as false for display autocomplete suggestion list. Please refer to the below code example. 

 public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) 
            IEnumerable Data = OrderRepository.GetAllRecords(); 
            Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations(); 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
                Data = operation.PerformSorting(Data, dm.Sorted); 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
                Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator); 
                if (!dm.RequiresCounts) 
                    return Json(Data); //Return records alone for the autoComplete list 
            int count = Data.AsQueryable().Count(); 
            if (dm.Skip != 0) 
                Data = operation.PerformSkip(Data, dm.Skip); 
            if (dm.Take != 0) 
                Data = operation.PerformTake(Data, dm.Take); 
            return Json(new { result = Data, count = count }, JsonRequestBehavior.AllowGet); 

Jayaprakash K. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon