XtraGrid Grouped with Summaries UI thread blocks on large data set - devexpress

Using DevExpress XtraGrid 16.2 for grouping and aggregation.
What I wanted to do is to group by any column and then some of the numeric columns will show totals in the group row.
I have customized BindingList<T> for XtraGrid datasource where T is just POCO objects.
When I create a GridColumn that needs to show a summary I subsequently create GridSummaryItem for that column.
My summaries are shown in group row:
gridView.OptionsBehavior.AlignGroupSummaryInGroupRow = DefaultBoolean.True;
There is a market data feed that updates BindingList<T> quite frequently (every 5 sec) and then BindingList<T> fires of OnListChnaged.
When I have 300 items and grid is grouped by one column with market data turned on the lag is minimal and group summary recalculates without a problem.
When I have 1500 items the XtraGrid blocks UI thread and whole application locks up.
I used performance profiler dotTrace 2016.1.2 and it looks like DevExpress XtraGrid fires off DoTypedSum when OnListChanged is fired and recalculates summaries for each group row each time BindingList<T> is updated.
I have contacted DevExpress support and they told me that I have to calculate summaries myself and then paint them but isn't the whole point of their feature for them to do this?
Has anyone encountered this issue and has solutions to speed up the performance.

Related

Tableau---Getting count from 2 different data sources and combining into one total

I am a tableau newbie and am trying to see if this is possible or not. I have 2 separate data sources where the same employees are listed, one is for closed cases and the other is for open cases. These data sources have some of the same columns, but for the most part they are different.
Is it possible to aggregate the case count for each employee on the closed and open data sources into a single column? For instance, if an employee has 50 closed cases and 23 open cases, I want it to show 73 for them.
I attempted to play around with the joins/unions but these didn't work properly and duplicated the data most times.
I think this is a great chance to leverage blends.
I have created a workbook with the Sample Superstore Excel dataset. This dataset has three sheets. I'll use the Orders and Returns sheets to demonstrate how we can calculate the net orders using blends.
The dataset I'm using can be found here.
Start by connecting to both the Orders and Returns separately. Once done with this step you should see the two data sources at the top of your data pane.
In this example, I'll calculate the Net Returns by Category. In your case, you're after the Total Cases by Employee, so just imagine Employee in place of Category.
Next, drag Category from the Orders data source onto the view, then select the Orders data source and click the chain icon to blend on Order ID.
You will need a common column between the two tables in order to blend.
Once blended I'll go back to the primary data source (indicated by the blue check mark) and create the Net Orders calculation.
This calculation uses the dot notation - similar to what you might see in SQL - to reference our other table.
To double check that our calculation is working properly, we can drag the components of this calculation onto the view and do the math.
Of course, once you are satisfied you can remove all but your blended calculation.
Blending isn't ideal in most cases but you could try it. Bring in each data source separately and "join" them within your workbook pane on Employee or hopefully an Employee_id. Click the little chain once you have them both loaded and you are on a worksheet tab. Then you could sum the counts by employee. Blending sometimes presents some issues with calculated fields across the two data sources but this is what I would try first.

(Abandoned) Sort 2 models based on 1 column in Qt

I've 2 QStandardItemModel where the first model holds data and the second one holds a summary of that data (earnings per day on 1st model and earnings per week on the 2nd. Each row is a productive unit and each column is a day/week).
Both models appear on separated QTableView and I'd like to be able to sort one model and affect the other, so the data of both models would always correspond to the same productive unit.
I want the user to be able to see daily data (and scroll through it) while seeing the weekly data at the same time, which is why I don't make a single model.
Currently, I'm using a QSortFilterProxyModel to handle the sorting, but that doesn't sort both models at the same time.
How can I sort them at the same time?
I found no solution for this problem. Instead I sorted it by choosing a less-than-ideal single QTableView. I'm thinking of allowing the user to set a max of summary columns to avoid them from overflowing the table (I haven't gotten to that yet).
Anyways, I just wanted to say that I consider this question abandoned

View State vs Server Load with Binding multiple gridviews in Asp.Net

There are 3 grid views.(one is filtered with search functionality and other two are just data bound)
View state disabled for all the three to lessen server resources.
Problem:
after performing filtering on 1st grid, remaining two are loosing its bound data.
which are the following are best alternatives?
Bind remaining two grids manually for every page load.
just enable view state independently for the remaining two grids.
any other suggestions apart from 1 and 2.

DevExpress custom grouping: groups also have columns, groups and independent rows exist simultaneously

I need to display message groups and messages inside a DevExpress grid.
Requirements:
message groups and messages have the same columns
groups have a special column with a '+'/'-' sign which specifies if the group is closed or open
when a group is closed its messages do not appear in the grid
when a group is opened by clicking the '+' sign its messages need to appear in the same grid underneath the group
the grid can have both groups and simple messages
The grid also needs to allow sorting, filtering and paging.
Is there a simple way to achieve this using DevExpress features?
NOTE: I've seen the DevExpress grouping demo, but this is different from my requirements because:
in the demo only the grouping value is displayed whereas in my grid I need to see all the columns of the message group
all rows are grouped (groups and messages can not exist at the same time)
EDIT: I have eventually abandoned this idea as it seemed to much trouble. What I did instead was add a column with a clickable link for groups; when the user clicks the link a popup appears with the children; it was much easier and more intuitive for the user
DevExpress has a tree.
Each Group can be a root level node and each message a node within its group, or a message could be another root level node (IE not within a group).
All nodes share the same columns. Each group that has messages will have a '+/-'

How to unit test a grid with paging

A common web UI design is to display a sortable grid (GridView, ListView, DataGrid) with paging. That is, the user can click on any column header to cause the records to be sorted in ascending or descending order on that column's data. And, the user can navigate among the pages of, say, 10 records at a time.
There may be millions of database
records that could potentially be
displayed on the grid.
There are many possible filters that
could be applied to the data
selection. The displayed records
might apply to the current user, or
to a date range, or to a customer,
department, product, order.
The user can sort the displayed
records on any column, and they can
navigate among pages.
How would you write a unit test(s) to confirm that the selected records are the correct records, for this filter, this page, and this sort order?
You will have to
decouple the filtering, sorting from the actual source so that you can mock the datasource
and test if the logic returns the correct records.
decouple the paging logic from the grid so that you can test if the paging gives the right indexes back.
That way you can test the filtering and the paging logic in separate units.
Next you could also use a automatic webtest to test the complete stuff (integration test).

Resources