Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Value History and Virtualization strategies and BindingRetentionMode bug
posted

Hello,

I have several use-cases for a grid bound to a large number of rows (10k+) that also needs to keep track of the value history for a couple of fields. This is also a live dataset which receives regular updates.

I am currently using the CellDataPresenter ValueHistory collection to keep track of changes on a column but I am running into several issues with regards to memory use. I need to store the history values of rows that aren't displayed in the scrolling region so I currently have the following settings for the grid:

 

        <igdp:XamDataGrid  
                                            CellContainerGenerationMode="PreLoad" 
                                            RecordContainerGenerationMode="PreLoad">

And my field settings are 

<igdp:UnboundField Label="Change"
                  Name="Change"
                  BindingMode="OneWay"
                 BindingPath="[PriceMove]"
                                       DataType="{x:Type System:Double}"
                                       BindingRetentionMode="Retain"
                                       >
                        <igdp:UnboundField.Settings>
                            <igdp:FieldSettings                                
                                DataValueChangedHistoryLimit="2"
                                DataValueChangedScope="AllAllocatedRecords"
                                DataValueChangedNotificationsActive="True"                                
                                CellValuePresenterStyle="{StaticResource staleCellStyle}" />
                        </igdp:UnboundField.Settings>
                    </igdp:UnboundField>

 

The style  staleCellStyle is using a converter to access the cell value history and do its magic.

My question is the following: 

Can I still use some virtualization features of the grid if I want to use full-grid history support? Can I virtualize the cells but not the records? I am slightly confused by the record / cell virtualization strategies here.

Also, I noticed that without binding retention set to Retain, the grid would sometimes not process the PropertyChanged events while scrolling, and the bindings would just get recreated after the event had fired, thus missing any updates that occured during scrolling - although the updates to the dataset are done on the UI thread.

Thanks for your help,

Florian