I have an UltraWinGrid with a potentially large datasource - anywhere from several thousand rows to 500k+ rows.
There is a known delay in fetching my data.
When I omit the summary row, the grid initializes and shows very quickly. When I add the single summary footer row (SummaryType = Count, DisplayFormat = "Total Rows = {0:#######}"), the initialization time slows dramatically. The amount of slowness seems to be proportional to the size of the data.
What options are there to speed up this summary creation? The value I want displayed is fixed and doesn't need to be calculated.
In case I wasn't clear... since I know my list size and I know what the summary line should show, I want to simply say:
DisplayFormat = "Total Rows = 1,234,567";
and have no unnecessary calculations occur.
Hello Tony,
Thank you for contacting Infragistics Developer Support.
What you could try is setting the SummaryType to External instead of Count. Then you need to subscribe to the ExternalSummaryValueRequested event of the grid and use the SetExternalSummaryValue method of the EventArgs SummaryValue. This way the UltraGrid control’s summary calculation logic is bypassed. For more information please visit this link:
http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/html/WinGrid_Performing_External_Summary_Calculations.html
Please let me know if you have any additional questions.
That looks like *exactly* what I need :-)
However, this is with a version of our product that shipped with v11.2 (11.2.20112.2034) of the Infragistics controls and that enum value (SummaryType.External) isn't defined/valid.
Sorry I wasn't clear on version earlier.
Thank you for the response.
If you are using 11.2 you might want to try setting the summary type to Formula, providing an empty formula and setting the DisplayFormat to the string you want to be displayed. This performed better in my test than setting the summary type to Count and worse than setting it to External. For this you could use code like:
SummarySettings ss = e.Layout.Bands(0).Summaries.Add(SummaryType.Formula, e.Layout.Bands(0).Columns("id")); ss.SummaryType = SummaryType.Formula; ss.Formula = ""; e.Layout.Bands(0).Summaries(0).DisplayFormat = "Total Rows 1,234,567";
ss.SummaryType = SummaryType.Formula;
ss.Formula = "";
e.Layout.Bands(0).Summaries(0).DisplayFormat = "Total Rows 1,234,567";
Alternatively you could use Giancarlo’s suggestion. The third option would be to upgrade your project. The External feature was added in 12.1.
Giancarlo, thank you very much for your suggestion.