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

RadDataGrid rendering issues #283

Open
byrialsen opened this issue May 29, 2018 · 5 comments
Open

RadDataGrid rendering issues #283

byrialsen opened this issue May 29, 2018 · 5 comments

Comments

@byrialsen
Copy link

Recently I started using RadDataGrid and it will be a vital part of my LOB application. I love the grid and its functionality, but my eyes are a little annoyed by some of the rendering. I have attached a screendump from the "UI for UWP Demos" that shows some of these issues.

  • Most of the times selection border is not show at the right when row is selected (actually not an issue on the screendump)
  • In generel row selection border is not shown consistent if cells contains graphics etc.
  • The scroller seems to be hidden behind GroupHeaders.

Are there any plans to look into such rendering issues. I assume others have seen this behavior also.

raddatagridrenderingissues

Thanks in advance
/Paw

@APopatanasov
Copy link
Collaborator

@byrialsen The observed appearance of the image is caused by the image itself and by the example. What I can suggest you in order to visualize it as expected is to change the Height of the image. You can also consider changing the height of the Row using the RowHeight property of the DataGrid in order to achieve the desired rendering.

About the ScrollViewer it is implemented in such way because the frozen Group headers should always be on top of the content the ScrollViewer has. I agree that could be improved, however currently the Framework prevent us from visualizing the frozen header in any other way - if the ScrollViewer goes above the frozen panel the control of the ScrollViewer will be on top of it as well.

I hope the provided information is helpful for you.

@byrialsen
Copy link
Author

byrialsen commented May 31, 2018

FYI...

...RowHeight does not fix anything in my own grid example, but changing the image (in my example colored rectangle) margin does fix the issue except first and last row. They seem to have smaller height than the others. (Please check the new screendump)

Additional you can also see in the screendump that vertical lines are drawn a bit inconsistent.

2018-05-31_11-45-03

@APopatanasov
Copy link
Collaborator

APopatanasov commented Jun 1, 2018

@byrialsen In the example with the Dasboard I was not able to observe the demonstrates visualization issue:
2018-06-01_1353

Maybe you should add a bigger Margin on the bottom to achieve a better layout for the Image? If it doesn't help please provide me a sample project that demonstrates your exact setup of the DataGrid.

@byrialsen
Copy link
Author

Hi.

Weird, I just open the "UI for UWP Demos" from the Store and I see the problem right away.

But looking at your screendump I assume you have added some extra margin/rowheight as you have space in top/bottom of each rows image. But if you zoom in on your screendump I can see that last row has less space in bottom compared to top. In the first row I guess you see the opposite. And all the middle row has the same space in top/bottom. It believe the behavior is hidden inside the control, and maybe kind of hard to fix from the outside.

@APopatanasov
Copy link
Collaborator

@byrialsen Some of the inappropriate layout of the cell is caused by the CellContentTemplate in my example. Inside the template there is a TextBlock whose Margin is affecting the layout:
<StackPanel Orientation="Horizontal"> <Image Source="{Binding PictureSource}" Width="96" Margin="5, 5, 0, 5"/> <TextBlock Text="{Binding ProductName}" VerticalAlignment="Center" Margin="8"/> </StackPanel>

I agree that when selection is made in the first and last row there is a little difference between the top and bottom. I believe this is caused by the way the selection border is placed around the row - in same way it covers a bigger part of the cell than expected. I will mark that issue as a bug. If you are interested on working on it you can check the arrange logic of that decorations in the following class:
https://github.com/telerik/UI-For-UWP/blob/master/Controls/Grid/Grid.UWP/View/Layers/XamlDecorationLayer.cs

Here the borders are measured and arrange. If you are able to find the issue in the mechanism you can make a pull request with a fix. If everything is fine with it I will merge it.

Thanks for you assistance and bringing this issue to our attention.

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

No branches or pull requests

2 participants