Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtualization Problem #1

Open
bblising opened this issue Nov 10, 2015 · 4 comments
Open

Virtualization Problem #1

bblising opened this issue Nov 10, 2015 · 4 comments

Comments

@bblising
Copy link

When scrolling, the cells only display the first Item in the RowsSource
I use a BindableCollection<BindableCollection> as RowsSource.
If I set EnableRowVirtualization="False" the problem disappears, but of course the memory consumption is tremendous.

@JohanLarsson
Copy link
Member

Thanks for reporting, do you have any ideas about how to solve this?
I wrote this lib mostly for small matrices.

@bblising
Copy link
Author

I don't really know how virtualization works. My guess is the bindings are not being applied properly because the datagrid assumes that only one DataContext is applied for each row hence every column have the same values as the first row. Maybe the DataGrid.UnloadingRow and LoadringRow event can be used to update the columns. I haven't exactly studied how you implemented the RowsSource yet so it's all theory.

I'm using this for a time based distribution of values. Surprisingly, it works well even for larger datasets (300cols x 30rows). But with virtualization disabled, it consumes around 450mb of memory. For now I'm culling the columns in my viewmodel to only contain a fixed number of columns.
.

@JohanLarsson
Copy link
Member

Can be solved now, interested in feedback.

@JohanLarsson
Copy link
Member

@barnstws have you had time to check if it got better/worse? There is a nuget package now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants