Hi,
I am working on an application that uses an ultrawingrid attached to a DataView
which is subsequently looking at a DataTable.
I am making use of the ultragrid group by facility to aggregate the figures in the grid.
However, I have some concerns over the performance of using group by. The data in the DataTable
could potentially be updated many times a second. Another option is to use another DataTable with a
data relation to the previous table and use the "expression" property on a column to do the summations.
However, doing this increases the complexity slightly and I lose some of the flexibility of doing it via the grid.
What do you recommend? I have read the article on performance tips (http://news.infragistics.com/forums/t/15306.aspx)
which will no doubt help. Are there any issues with regard to performance of using the group by in a grid?
Many thanks
If you are calling band.SortedColumn.RefreshSort(true) and the rows are not moving to the correct groups, then that is obviously a bug.
But we are not currently aware of any such bugs in the grid. Can you post a small sample project demonstrating this behavior?
From version 10 of the winforms library, the GroupBy functionality to refresh has not worked. i.e.
To make the grid re-sort or re-group, you have to use the band.SortedColumns.RefreshSort method. This allow you to have total control over when the grouping and sorting is refreshed.
My ultragrid relied on this functionality when some data is changed on a row and i expect the data to move into the correct group. Instead the data is changed but it is still grouped under the wrong group.
e.g. Imagine having data rows with two columns, index and title and the ultrawingrid is grouped by the index from 1 to 10. If the row changes from 1 to 2 for example, that row stays in the group for 1.
Thanks,
Richard
inmana said:I am not using a calcmanager. Should I?
It's hard to say for sure, but I think the CalcManager would probably be more effiicient because it performs tha calculations asynchonously. The down side of this is that summaries may not always be in synch with the values on the screen. For example, you might change several values in the DataSource and the actual grid will will update to display the new values, but the summaries will not neccessarily be calculated immedaitely - they might lag behind a little bit.
Hi Mike,
I am not using a calcmanager. Should I? There are no formulas as such in the grid.
I am just using the summaries facility that the grid provides. As a result when you do a group by,
each group by row has the sum of all the totals under a category which updates automatically as
the figures in the DataTable are changed. I guess the question is whether this is more or less
perfomant than doing the summations via another DataTable using a datarelation and an expression
in the data table etc.
thanks
How are you perofrming the totals calculations?
Again, it's really hard to say how performant it will be, since there are so many factors at work here. I would think that if you are using CalcManager to calculate the totals in a summary, then it should be fine, since CalcManager is optimized to calculate the visible cells in the grid first. this means that the grid will only be calculating a few summaries at a time, anyway.
But the only way to really know is to try it out and see.