Blogs

Gary's Blog

XtraGrid and XtraPivotGrid – Grouping vs Pivoting for Data Display

     

Choosing the correct grid from our controls can be important when displaying and manipulating data, take this example:

Let’s say I write an application that analyses the postings made by the Devexpress evangelists. If I store such data in a database and wish to view and manipulate the data, I could choose to use the XtraGrid. Having bound the control to a summary view of the data, in the normal way, and running the application, I see the following:

image

As you can see, by default, because we are dealing with summary details, everything is a bit of a mish mash. There are mixed dates in the first column and mixed up names in the second column. To try and make things a little better we can group our data, either on “Date”:

image

or on “Name”:

image

Both of these are an improvement on the original but still do not make the data very clear. If we swap the XtraGrid for the XtraPivotGrid and again bind to the summary data we get:

image

Now, if we drag and drop the “Date” onto the row fields area:

image

and the “Name” onto the column fields area:

image

and finally, the “Number of Posts” onto the data items area:

image

then we can get a nice, clear view of all of our data.

So, as you can see, whatever your grid needs, at Devexpress we’ve got it covered. :-)

Published Apr 22 2010, 04:25 PM by Gary Short (DevExpress)
Filed under: ,
Technorati tags: XtraPivotGrid, XtraGrid
Bookmark and Share

Comments

 

James Foye said:

The XtraPivotGrid is a slick tool, indeed, and probably very underutilized. I recently used it to create a reporting tool and the client was very happy with it.

April 22, 2010 11:37 AM
 

Gary Short (DevExpress) said:

Glad you like it James, it was certainly the tool I needed for the job.

April 22, 2010 11:43 AM
 

Twitter Trackbacks for Blog: XtraGrid and XtraPivotGrid ??? Grouping vs Pivoting for Data Display: Choosing the correct grid from our contr... [devexpress.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Blog: XtraGrid and XtraPivotGrid ??? Grouping vs Pivoting for Data Display: Choosing the correct grid from our contr...         [devexpress.com]        on Topsy.com

April 22, 2010 11:54 AM
 

Peter Thorpe said:

PivotGrids with charting are my favourite toys for statistics. I try to offer both view types for any grids using the same or a similar data source. The trouble comes in educating users.

April 22, 2010 12:44 PM
 

Ivan N (DevExpress R&D) said:

Peter, here you can find end-user documention:

devexpress.com/.../Help.xml

This may help.

April 22, 2010 2:35 PM
 

Matthew MacSuga said:

Gary,

THANK You for such a thorough explanation of how this works.. now I finally "get it" -- sorry, haven't used the Pivot Grid, nor have I in the past.. now I totally see how I can use it.  

Nice post.

Thank you.

- Matthew

April 22, 2010 4:20 PM
 

Peter Thorpe said:

@Ivan Thanks I have that and it is helpful but the issue with my users tends not to be with operating the pivotgrid but getting them to understand what information they can get from it very simply. The people for instance that work in finance have no problem but not everyone is logically/mathematically minded.

April 22, 2010 4:40 PM
 

Robert Fuchs said:

It's a great control, indeed.

My problem with it is, that it performs very poor, especially in XAF.

April 22, 2010 6:34 PM
 

Peter Thorpe said:

@Robert I haven't experienced this what kind of number of records are we talking about?

April 22, 2010 7:30 PM
 

Ivan N (DevExpress R&D) said:

Peter, I'll talk to Alan tomorrow to see if we can do some video tutorials for end-users.

April 22, 2010 11:38 PM
 

Gary Short (DevExpress) said:

@Mathew, you are welcome, glad you liked it the post.

@Robert what kind of data are you binding to? A cube or straight table? What sort of size are your sets of data? Do you have a use case we can look at this problem with? Email me at garys@devexpress.com and I can look into this for you.

April 23, 2010 10:26 AM
 

Gary Short (DevExpress) said:

@Mathew, you are welcome, glad you liked it the post.

@Robert what kind of data are you binding to? A cube or straight table? What sort of size are your sets of data? Do you have a use case we can look at this problem with? Email me at garys@devexpress.com and I can look into this for you.

April 23, 2010 10:26 AM
 

Peter Thorpe said:

@Ivan that could be good I would suggest using a good sized data set with a few different field types such as datetime, string and int so you can cover the main grouping scenarios. I always find by month is a nice one to get them to understand what is happening.

Perhaps the different summary types as well so you cover something like money where you sum and then do something like counts of people.

April 23, 2010 12:07 PM
 

Bruno Cossi said:

@Gary: We are seeing huge performance issues also, particularly when using the Pivot Grid (either XtraPivotGrid or AspxPivotGrid) against an OLAP cube.

April 24, 2010 4:25 AM
 

Gary Short (DevExpress) said:

@Bruno can you give me some ideas of the dimensions of your cube? Drop me an email at garys@devexpress.com and I'll take a look at this for you.

April 24, 2010 6:30 AM
 

Alan Livingstone said:

I had a number of grids that I just wasnt 100% happy with to allow users to manipulate the view, so I decided to try the pivottable.  One of the best decisions I have ever done, especially when it can link to live charts with what ever data the user highlights.

End users just love it, especially after showing them how easy it is to change they way the want to view the data.

April 25, 2010 6:45 AM
 

Christophe Keller @ PTS said:

I also had performance problems with the XtraPivotGrid. I have a table with about 12000 invoices, and I want to group the invoices prices per year, quarter, customer, country and so on.

But I guess this is a problem that can't be easily solved as the number of calculations needed grows with the square of the number of records.

Another thing that should be fixed is the possibility to order columns that contains values provided via the CustomCellValue event.

Finally the XtraPivotGrid's documentation is much weaker than the one for the XtraGrid, which means you loose much time trying to figure out how to use it besides the standard scenarios.

To sum up, I think the control is interesting but lacks maturity.

Finally I went woth totals computed via SQL in a XtraGrid, and my problems were solved.

April 28, 2010 4:35 AM
 

Alberto Cortes said:

I love this tool (and my customers love it too).

They use this for every report they need (they prefer use pivot over custom reports).

The only problem is when I need to show data from navegate many to many relationships, or complex relationship.

August 17, 2010 1:49 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.