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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataOperations.PerformFiltering error

Thread ID:

Created:

Updated:

Platform:

Replies:

149169 Nov 17,2019 05:01 AM UTC Nov 18,2019 01:23 PM UTC Blazor 1
loading
Tags: Grid
Costa
Asked On November 17, 2019 05:01 AM UTC

Hi. Error when implementing DataOperations.PerformFiltering for Blazor and "startswith," endswith, "contains" operators. It appears that an error occurs for both IEnumerable and IQueryable.

Renjith Singh Rajendran [Syncfusion]
Replied On November 18, 2019 01:23 PM UTC

Hi Costa, 
  
We have already considered this as a usability feature improvement “Problem with DataOperations when bind IQueryable data to Grid”, and logged a task for the same.    
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.   

We have planned to implement this feature in our Volume 4, 2019 release. Until then we suggest you to bind List values to Grid to overcome the problem you are facing.  

Please refer the below code example. 

 
public Object Post([FromBody]DataManagerRequest dm) 
        { 
            // Here we have converted dataSource as list to resolve the problem 
            IEnumerable DataSource = db.Orders.Select(x => new Order 
            { 
                OrderID = x.OrderID, 
                EmployeeID = x.EmployeeID, 
                CustomerID = x.CustomerID 
            }).ToList(); 
            if (dm.Search != null && dm.Search.Count > 0) 
            { 
                DataSource = DataOperations.PerformSearching(DataSource, dm.Search);  //Search 
            } 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
            { 
                DataSource = DataOperations.PerformSorting(DataSource, dm.Sorted); 
            } 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
            { 
                DataSource = DataOperations.PerformFiltering(DataSource, dm.Where, dm.Where[0].Operator); 
            } 
            int count = DataSource.Cast<Order>().Count(); 
            if (dm.Skip != 0) 
            { 
                DataSource = DataOperations.PerformSkip(DataSource, dm.Skip);   //Paging 
            } 
            if (dm.Take != 0) 
            { 
                DataSource = DataOperations.PerformTake(DataSource, dm.Take); 
            } 
            return new { result = DataSource, count = count }; 
        } 


Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon