Hello. I use XamDataGrid with data virtualizing datasource (from sql). I want allow users make some calculations with built-in summary calculators. The problem is that default calculators go throw all of visible datarecords in grid. In this case grid request all data from my virtualizing datasource and this takes a lot of time.
The best solution for this problem is making SELECT COUNT()/SUM()/MIN()/MAX() query to database from EndCalculation method instead of aggregation. How can I do this? I'm trying to comment this lines
//foreach ( DataRecord record in dataRecords )
//{
// object dataValue = record.GetCellValue( sourceField, CellValueType.EditAsType );
// calculator.Aggregate( dataValue, this, record );
//}
in SummaryResult Class (at XamDataGrid source files). But when I compile library whith this changes I can't use it in my application.
Error 12 The type 'Infragistics.DependencyObjectNotifier' is defined in an assembly that is not referenced. You must add a reference to assembly 'InfragisticsWPF4.v11.1, Version=11.1.20111.2113, Culture=neutral, PublicKeyToken=null'. C:\Users\....cs 9 18 MyWPFApplication
(References contains last version of InfragisticsWPF4.v11.1 from C:\Program Files (x86)\Infragistics\NetAdvantage 2011.1\WPFCommon\Bin\InfragisticsWPF4.v11.1.dll)
How can I get away from Aggregation method without recompiling? Or how I must compile it correctly? :(
Thanks.
Hello,
Thank you for your post. I have been looking through it and I can say that we do not support custom modification on our assemblies. In your particular case I can suggest you, instead of changing our code, create custom summary calculators and you can just not add any code in their Aggregate method. Here it is explained step by step how you can create such calculators:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamDataPresenter_Creating_a_Custom_Summary_Calculator.html
Feel free to write me if you have further questions on this matter.
No, I can't do this, because custom summary calculator inherited from SummaryCalculator, which has Aggregate method, which takes Record record object in parameters. Default realization go throw all records in datagrid to aggregate it, so if I leave custom Aggregate method empty it always will request all records in the grid for empty method.
The problem is when datagrid request some index from datasource it load from database (I use data virtualization). So instead of simply "select count(*) from mytable" (executes very-very fast) at EndCalculation method datagrid load all data from database (for example, 1 000 000 rows and 100 columns - it takes a lot of time) and I can't restrict it :(.
Besides, why Infragistics do not support default data virtualization like it supports your competitors? :) Users must write own filter, sorting, summaries etc. code. It will be cool, if you implement this.
Thanks for your answer and sorry for my bad english.