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.
Hello again,
I can say that we do provide virtualization for the XamDataGrid. Here you can see the different virtualizations’ modes:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=InfragisticsWPF4.v11.1~Infragistics.Windows.Controls.ItemContainerGenerationMode.html
We provide Record, Label and Cell virtualizations. Also there are built-in Filters, Summaries and Sorting, too. They are all described in our online documentation. As for your question about summaries I can say that they are made to use the Records in the XamDataGrid, not the underlying objects, because this way we can control them. Otherwise if you display only half of the Fields, or you add UnboundFields with some calculations, for example, and the Summaries use the underlying objects then they won’t be accurate. So I can suggest you create stored procedures and use them for displaying summaries.
Hope this helps you.
I talk about data virtualization (about the data source). Your competitors have some build-in solution for this (link to sql adapters etc).
>> because this way we can control them
Ok. I very dissapointed that I can't compile own version with commenting some code in sources :(. Thanks
After some research, using DB summaries has been determined to be a new feature request. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is FR13726.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com