Hello Team,
In a grid we have set summary for few columns. This summary we are using further for our calculations. The columns on which we have set the summary are hidden. On the Grid SummaryValueChanged event we are setting this summary values in another Grid. But for some reason the SummaryValueChanged event is not fired, but when I unhide the summary column the event is fired.
We have following queries :
1) Is there any way to get the summary value without unhiding the columns.
2) How to hide the summary row. We do not want to display the Grand total or Grand Summary row to user.
Hi,
rhealsoftTakeoff said:1) Is there any way to get the summary value without unhiding the columns.
I think Summaries are only calculated when they are visible for efficiency purposes. If you have a grid with thousands of rows or summaries on a child band, you don't want the grid using up processing time calculating summaries that the user can't see.
I don't think there's any way to do this using the SummaryValueChanged event, but if you read the value of the summary, it should get calculated at that point.
If your summary is being calculated on the root band, and not a child band, then another option might be to use a CalcManager formula. You could use a NamedReference to caculate a summary of a grid column and the you could use the NamedReferenceResultChanged event of the CalcManager to detect changes.You might need to set DeferredCalcualtionsEnabled on the CalcManager to false.
rhealsoftTakeoff said:2) How to hide the summary row. We do not want to display the Grand total or Grand Summary row to user.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.SummaryFooterCaptionVisible = DefaultableBoolean.False; }
Please find attached a snapshot giving details.
'Order' is our main grid. on Click of the order the order detail grid is displayed. On the order Detail 'InitilalizeLayout' event we are setting the formulas and also the summary. This summary is further used in the order Purchase and Order Total grid.
The grid is taking lot of time to load, there could be say 500 rows, the number of columns are not fixed as the columns are attached dynamically. We tried following option to improve the performance, but every time got stuck with some other issue.
1) At the time of form load we are biniding the blank dataset (only having the structure of the Order detail) to the order detail grid. But here the summary is not assigned to the grid. We are restricting the 'InitilalizeLayout' event to be fired every time.
Result :
The Grid is loaded very fast, but it takes time to load the Total column, we can see that it is calculating each row. takes time to load total for each row.But since we have not assisgn the summary column to it we cannot do the further calculation on Order Purhcase and Order Total grid.
2) Set the Summary column :
We tried to hide the summary columns. After doing so the grid is loaded but when we unhide these column it takes time to refresh the grid and also we can see the grid calculating row by row values.
We tried using the NamedReference but we cannot assisgn a grid column to it. Please not we have multiple columns with summary which would be used in the order purchase grid and also we don't know how many column would be there, so we cannot take a text box or label to assign it to the named reference.
The grid has performance issue with or without the summary columns.
Please help as we don't know how to go ahead with this.
I'm afraid you lost me. I really don't understand what you are describing or what the problem or problems are. This seems like it might be a little too complex to work through here in a forum post.
I recommend that you try to create a small sample project that demonstates the problem (or problems) you are having and then Submit an incident to Infragistics Developer Support so they can check it out.
Hi Mike,
I got a very good article written by you for the Grid Memory Usage, It helped me a lot. Thank you.
I am stuck up in another issue. Please find attached an book1.zip file. It has an excel file in it. It has all the calculations need by us.
Looking forward for your reply.
Thanks