Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Visual issues after scrolling vertically #98

Open
JeroenTrivec opened this issue Jul 13, 2018 · 6 comments
Open

Visual issues after scrolling vertically #98

JeroenTrivec opened this issue Jul 13, 2018 · 6 comments

Comments

@JeroenTrivec
Copy link

Using version 3.1.0, on both Android and iOS. I have a DataGrid within a Grid on a ContentPage.

The datagrid seems to have visual issues after scrolling vertically. The two I noticed:

  • I configured a RowsBackgroundColorPalette with 2 colors. After scrolling down, those colors don't alternate properly anymore. I'll have three successive rows with color A, then one with color B. Here's two screenshots from the Android version, one before scrolling, the second after scrolling down and back up. Every time I do this, the row colors change.

datagrid_screen1
datagrid_screen2

  • More importantly, the selected item isn't displayed properly anymore. It acts differently on Android and iOS, but both have issues. On Android, it seems to highlight a completely random row every time you select one. I couldn't find any correlation between the highlighted row and the one I actualy selected. On iOS, it's more accurate, but it seems to like to highlight more than one row at once. Usually two successive rows, but sometimes there's gaps.
    To be clear, the actual selected item in code is correct, and it only happens after scrolling down at least once.

Below is an iOS screenshot.
img_0037

@uksreejith
Copy link

I am also facing this same issue. Any solutions yet?

@joanbarros
Copy link

I've noticed that if you put the grid into a ScrollView this solves the issue. The only drawback is that the column headers are not kept at the top and disappear when you scroll down.

That can be a workaround until this get's fixed.

@JeroenTrivec
Copy link
Author

I've noticed that if you put the grid into a ScrollView this solves the issue. The only drawback is that the column headers are not kept at the top and disappear when you scroll down.

That can be a workaround until this get's fixed.

This does solve it, until you have a datagrid inside a modal or popup view. There, the scrollview makes no difference.

In my case, I don't allow the user to sort manually, so I can just replace the datagrid's headers with some labels above the scrollview, so they stay on screen.

@pmb134
Copy link

pmb134 commented Oct 29, 2018

I've noticed that if you put the grid into a ScrollView this solves the issue. The only drawback is that the column headers are not kept at the top and disappear when you scroll down.

That can be a workaround until this get's fixed.

thank you

mmasdivins added a commit to mmasdivins/Xamarin.Forms.DataGrid that referenced this issue Apr 6, 2020
Solved issue akgulebubekir#98 Visual issues after scrolling vertically.
akgulebubekir added a commit that referenced this issue Apr 6, 2020
assemhakmeh pushed a commit to assemhakmeh/Xamarin.Forms.DataGrid that referenced this issue Oct 16, 2020
Solved issue akgulebubekir#98 Visual issues after scrolling vertically.
@hiiro-sips
Copy link

The issue about selected item backcolor have not yet been fixed ?
On iOS, once I scroll down, some rows that is not selected is set to ActiveRowColor. (even latest code from github)

@maundmo
Copy link

maundmo commented Feb 10, 2022

I have the exact same problem. I've decompiled the latest release (4.8.0) and can't seem to find the change mentioned in the commit.
Am I doing something wrong or is it possible to make a pre-release with the changes?

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

No branches or pull requests

6 participants