I'm using transformedData method as said in this post but with a different propose. I want to export the grids data. I was following 'Suggestion 2' in this post but then I realized that dataView method returns only the current page rows. I want to get filtered rows but from every page (from transformedData documentation that would be the second option: "2. After filtering before paging"). However I've tried and it doesn't work correctly. It returns the result from the last used transformedData method.
Here you can see this odd behavior.
I need to get the records after filtering and sorting but before paging. How can I do?
Hello intecomp,
I investigated your sample in jsFiddle and I noticed that you're looping through an object that you haven't defined: 'filteredData'. I assume that while you were trying to adopt the code from this sample: http://jsfiddle.net/u3jr6fs1/ you didn't change the name of the transformedData object variable. I modified your sample and now it returns the correct data after filtering from every page: http://jsfiddle.net/u3jr6fs1/5/ as per your requirement. If you need further assistance, please let me know.
Regards,
Tsanna
Hello Tsanna, thanks for your reply but I'm afraid the bug is still there.
You were right about using the undefined filteredData variable but it wasn't the problem. I made a few changes to your script:
The script with those two changed works great, you can see it here: http://jsfiddle.net/u3jr6fs1/8/.
But then, I made a second script which adds the call to a function in the click event. That function only calls a few times the method transformedData. It doesn't even use the results. However, the behavior then changes. After that function's execution, the result from transformedData('afterfilteringbeforepaging') is wrong. This second script is here: http://jsfiddle.net/u3jr6fs1/6/.
Looking forward to hear form you,
Diego.
Ok, so maybe transformedData is not the function I need.
What I need is to get from the original data source every record that match the filter criteria (if any) that might be shown (current page) or might not be visible (other page). What I mean is, the execution of afterfilteringbeforepaging but using always the original datasource no matter what has been done or called before. Please help me because I really don't understand how I am supposed to do this and it is taking me much longer than it should.
Thanks,
Diego
You can still use transformedData method, but I could not understand why you want to call it so many times one after other? Calling transformedData method with transformed execution: 'afterfilteringbeforepaging' will return all records through the whole data source after filtering, no matter what the current page is. Please let me know why is so necessary for you to use custom function that reapplies the transformations?
Hello Tsanna.
As I told you in my last post, I need to use a different method. This is because I'm using IgniteUI Grid in a web application in a lot of pages. Some of those pages, before and after needing the records (filtered but not paged) use different methods of the grid. I need to make sure that I have a function that whenever its called it returns that information. No matter what has been called before and without affecting what might be called after.
Beside my very specific scenario what I need is a really basic functionality. I want to get every datasource's object which related record is currently on the grid (being shown at current page or not).
Hello,
Thank you for reporting this.
I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behaviour in our internal tracking system with a Development ID of 192590. A support case is created on your behalf with number CAS-153330-Q8D7G4, so that you can be notified when the bug is fixed.
You can find your active cases under Account - Support Activity in our website. Select your ticket and go to Development Issues tab to view the status of related bugs.
For now I can give you a temporary workaround. Use this code to get the filtered data without the paging applied to it:
function getData() { var ds = $('#table1').data('igGrid').dataSource; var transData; if (ds._filter) { transData = ds._filteredData; } else { transData = ds.data(); } return transData; }
Let me know if I may be of further assistance.
Kind Regards, Petko Zhekov Senior Software Engineer
Your development issue has been addressed in our latest service release which is available for download.
Please let me know if you come across any further issues with the new service release or if you have any further questions .
Kind Regards,
Petko Zhekov
Software Developer
Infragistics, Inc.