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.