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

ej-datamanager-filter Menu

Thread ID:





128692 Feb 6,2017 12:42 PM UTC Feb 7,2017 01:07 PM UTC ASP.NET Core 1
Tags: Grid
Asked On February 6, 2017 12:42 PM UTC

Here , i am using  viewBag-datasource and datamanager for Grid  . my problem is filtermenu is not working while using datamanager but it is working while using viewbag...pls give some example code...  thank you

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On February 7, 2017 01:07 PM UTC

Hi Tamil, 
Thanks for contacting Syncfusion Support.  
We suspect that you are using the jQuery v2.x.x. In this version, classes like DataManager were not properly extended and returns the plain object which in turn affect the DataManager operation. So we suggest to use the jQuery 3.x version in your application. We have prepared a sample in two different versions of jQuery. 
If you are still facing any problem, please share the following details to analyze the problem at our end.  
1)      Code example of the Grid and code behind 
2)      Version of the Essential Studio and jQuery 
3)      Stacktrace of browser console (if any error) 
4)      Screenshot with replication procedure or video demo for an issue 
If you are using the UrlAdaptor, you have to handle the server filtering in the server-end as follows. 
<div id="Grid"></div> 
<script type="text/javascript"> 
    $(function () { 
        var dataManager = ej.DataManager({ 
            url: "http://localhost:53477/Home/DataSource", 
            adaptor: new ej.UrlAdaptor() 
            dataSource: dataManager, 
            allowSorting: true, 
            allowFiltering: true, 
            allowReordering: true, 
            filterSettings: { 
                filterType: ej.Grid.FilterType.Menu 
              . ..  
        public ActionResult DataSource(DataManager dm, bool? ckFlagTratt) 
                IEnumerable Data = dp.convertToTypedList(DsFestivita); 
                int count = 0; 
                DataOperations operation = new DataOperations(); 
                if (dm.Where != null && dm.Where.Count > 0) 
                    Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator); 
                    if (!dm.RequiresCounts)//when count doesn't requires, result alone will be returned 
                        return Json(Data, JsonRequestBehavior.AllowGet);//Return records alone for the autoComplete list 
                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); 
We have also discussed about the server APIs for handling the server actions. Refer to the following KB. 
Seeni Sakthi Kumar S. 


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