Wired my first xamPivotGrid into a user control that is consumed by a winforms app. Borrowed a method from these forums that takes a DataTable and dynamically all columns and rows to an Ilist, which is set to the pivotDataSelector and pivotGrid's DataSource.
My application loads at a cost of 90,512k. I load the data into the pivot grid and it hit 96,180. The DataTable contains 1,216 rows and 8 columns. Dragging just 3 columns to the Rows box drives the application memory cost to ~1,650,227k before the application throws a System.OutOfMemory exception.
As my first venture, I am obviously missing something critical here, but not finding much and not really sure what to look for. Feeling additional paing because I am under the gun to get something working and performing by next Monday. I have seen code examples that set hierarchies and a whole bunch of other things that do not seem very appealing because of hard-coded column names, etc., and not even sure these would help me?
In short, I guess what I need is something like "Jaime, if your clients will be working with large (is my example above large???) data tables, then you need to do this..."
I will seriously cry if I can't get this to perform well. We purchased the IG Ultimate just for the pivot grid and time is running out for me... perhaps literally at that!
Many thanks!!! -Jaime
Hello Jamie,
In case the Plamen’s suggestion helped you solve your issue please verify the thread as answered, so the other users may take better advantage of it.
Regarding your question about hiding the totals, you can have a look at the following forum thread which discuses a possible approach to achieve the desired design:
http://blogs.infragistics.com/forums/p/49509/274950.aspx
If you have any furhter quesitons or concerns on that matter, please do not hesitate to ask.
I should try to think before posting. :)
All child nodes should be expanded. What I would love is to not have totals for Category, Brand and Product where there is only one. Please tell me this is possible?
Hello Plamen,
Your sample works great. The only enhancement that would make it perfect would be to not expand child nodes if there is only 1. This way you do not end up with a bunch of "total" rows for a single Category, Brand, and product. Product should only be expanded if there is more than 1. Same for Brand and Category. Is this an easy tweak?
The good news is after expanding all nodes the memory only hit a maximum of 200,000 kb, so the issue is only with dragging dyamic rows into the grid with no pre-defined data class or heirarchies.
Thanks!
Hello JaimeZ,Please look at the updated sample. I've modified it to work as you've described. Now there are two different event handles listening for CollectionChanging events - one for the rows and one for the columns. There is a note about when there is more than one hierarchy in the area. The hierarchies next to the first one might have more than one node for given member and expanding one node will result in expanding all nodes related to the same member. Look at the images bellow:
No matter which Category1 node is clicked will result in that all Category1 members will be expanded
Look at the sample and if it covers the scenario you have described we can continue to work on the memory issue. Regards.Plamen.
Disregard my question about the event method. The answer was right in front of my face. Bad morning... Computer troubles delayed me for over two hours. :)