Hi,
I am using ASP.Net MVC & IgniteUI.
I have a grid that displays paged data. The paging is remote & by that I mean that the whole result is not fetched at once in the form of IQueryable result set. I have Sql query that pulls only the requested page data by using the PageSize & PageIndex properties of the grid.
Therefore the datasource of the grid knows only about tha data which is currently being displayed on the page and not the whole dataset.
Now I want to use remote filtering, Here I want the remote filtering to search for data in the whole table of the database rather than only the displayed page of the grid.
In Remote Paging I used PageSize & PageIndex property to pull only the requested page of the grid.
How can I search the whole table for the matching data rather than only the current page data ? Do I have to construct the query myself or will IgGrid provide this functionality like it does in Local Filtering? In Local Filtering only the paged data is searched, I want to search all the pages of my grid but the problem is only the current page is the datasource of the grid and hence the grid does not know about other pages.
How can I achieve this? Please provide a short sample if you can, that would be really helpful.
Yes, my issue was resolved, thanks for your help.
Hello Omer ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Hello Omer,
I’m glad to hear you were able to resolve the issue.
Since the DataSource accepts only IQuryable you won’t be able to pass the additional property as part of the records data.
Since you have remote operations enabled in the grid you can remove the DataSource property and use the DataSourceURL option instead.
Let me know if you have any additional questions.
Developer Support Engineer II
Hello Maya,
Thanks for your time and cooperation. I was able to resolve the issue , In my grid I had a DataSource property which got an IQueryable of 10 records when the grid is loaded first time. & Because it was an IQueryable i couldnt supply the RecorCountKey property to the grid, Therefore the grid didnt display correct number of pages the first time, Only when the DataSourceUrl was hit through changing the pageSize, The grid got its RecordCountKey property through the Json result because DataSourceUrl returns ActionResult of type 'JsonResult' which contains Records as well as RecordCountKey where as the IQueryable<myModel> returned by DataSource only contained Records.
Solution:
I changed autogeneratecolumn to false, removed DataSource property from my grid model altogether, And only called DataSourceUrl after I add columns to my grid model & now the grid shows correct number of pages as soon as it is rendered.
The issue is resolved , I was just curious to know whether we could supply the RecordCountKey property in the DataSource(IQueryable) also or is it not possible? Though, my grid is working alright now, Thanks for your time and valuable help, Both my Filtering & Paging issues are resolved, Thanks.
When testing this on my side with the previously attached sample I’m not able to reproduce the behavior you have described.
I’ve attached a screenshot of how this looks on the initial load for your reference.
Please test the project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 14.1.20141.2031 of 14.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.