Comments (8)
I observe the same issue. And it seems that this occurs especially if there's a lot of data to be loaded, and scrolling-speed is high. If I scroll slowly (e.g. using the arrow-buttons instead of the mouse, or also just slowly with the mouse-wheel), then content is loaded in dynamically fine. But if I scroll "quickly", suddenly the cell within one row get shifted around (same as in the picture above).
Also note: I'm using TemplateColumns.
Could it be, that the dynamic reloads due to changed viewport during scrolling is somehow messing up the row presenters?
Would really be great to have this fixed, as it's kind of breaking the usage of TreeDataGrid fully (I'm looking for a workaround...)
from avalonia.controls.treedatagrid.
I solved this problem by making 2 columns instead of 4, i.e. 1(1) - 2(2-4) and made a large template for the 2nd column (which replaces 3) and the bug disappeared, this may help you out
from avalonia.controls.treedatagrid.
Nice one! Yes, that works. Not ideal, but it's a working workaround ;) Thanks!
from avalonia.controls.treedatagrid.
I've got the same Issue when used this template:
<TreeDataGrid Source="{Binding Source}" ShowColumnHeaders="False">
<TreeDataGrid.Resources>
<DataTemplate x:Key="Names">
<ContentPresenter Content={Binding}>
<ContentPresenter.DataTemplates>
<DataTemplate DataType="{x:Type vm:ClassA}">
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
<DataTemplate DataType="{x:Type vm:ClassB}">
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ContentPresenter.DataTemplates>
</ContentPresenter>
</DataTemplate>
</TreeDataGrid.Resources>
</TreeDataGrid>
I want to use this control as virtualized TreeView.
from avalonia.controls.treedatagrid.
Can you try with latest changes on master?. There are some new fixes that probably fix this issue.
from avalonia.controls.treedatagrid.
Can you try with latest changes on master?. There are some new fixes that probably fix this issue.
It doesn't seem to resolve my issue. Example to reproduce this bug: https://github.com/moskalevkn17/AvaloniaTreeDataGridBug/tree/bugExample
I added a new tab "Diffs" in TreeDataGridDemo. If you scroll through an items quickly, you will see that they are randomly mixing.
from avalonia.controls.treedatagrid.
If I change ContentPresenter with ContentControl then bug will disappear.
from avalonia.controls.treedatagrid.
The bug is still here and it is easily reproducible in the Sample App from this repo. Just download it, compile it, and run it without any modifications except updating Nuget packages to the latest versions (this step is optional). Switch to the Wikipedia tab, wait for the content to be completely loaded, then scroll the content up and down by pressing the Up and Down arrows. After several iterations, you'll see the following (see the screenshot).
The bug is reproducible in Mac OS and Windows. In addition to the entries shifted you can notice artifacts from the selection which don't disappear. There's no actual selection on the screenshot, everything is an artifact.
from avalonia.controls.treedatagrid.
Related Issues (20)
- Rows arranged incorrectly after switching tabs
- [Bug] `Star` width column collapse to minimal size when Column header is hidden HOT 1
- Selecting too many nodes blocks the UI thread HOT 2
- Selecting all nodes is calling BuildTemplateColumn too many times causing slowdowns
- [Feature request] Real-time Application of FormatString in NumericUpDown Component
- TreeDataGridRow Binding Error HOT 1
- How to make a Flat TreeDataGrid Editable with dynamic values from a dictionary HOT 2
- Unsaported Project NET version HOT 2
- InvalidOperationException: Call from invalid thread
- Invisible in web assembly
- Enable IsTrimmable
- TemplateColumn/TextColumn Header in FlatTreeDataGridSource do not support template by ResourceKey
- FlatTreeDataGrid do not support CTRL+A HOT 1
- [Suggestion] Use the same default colors that the TreeView control
- TreeDataGrid does not work unless you are running FluentTheme HOT 1
- TreeDataGrid does not work unless you are running FluentTheme HOT 10
- How to focus on cell? HOT 2
- TreeDataGrid is flickering when using a binding to a task with fallback value
- Error "Object reference not set to an instance of an object." if FlatTreeDataGridSource is recreated with changing edit mode HOT 2
- Rows and columns visually lose alignment when refreshing the grid and setting the Value of the horizontal scrollbar. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalonia.controls.treedatagrid.