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

last DataGridCell gets clipped if RowHeaders are visible. #8323

Closed
timunie opened this issue Jun 10, 2022 · 2 comments · Fixed by #8520
Closed

last DataGridCell gets clipped if RowHeaders are visible. #8323

timunie opened this issue Jun 10, 2022 · 2 comments · Fixed by #8520

Comments

@timunie
Copy link
Contributor

timunie commented Jun 10, 2022

Describe the bug
This is a stange thing. If I enable RowHeaders and not all columns fit into the space (horizontal scroll viewer) the last Cell of each row is clipped or hidden by a rectangle (see Screenshot)

To Reproduce
Steps to reproduce the behavior:

  1. Go to ControlCatalog ► DataGridPage
  2. change the XAML like below
    • RowHeaderWidth="40" is important
    • No column width is * is important
  3. resize the columns until the horizontal scrollviewer is visible
  4. Scroll to the right end
  5. See the las cell is clipped or hidden by a rectangle

Code

<DataGrid Name="dataGrid1" Margin="12" CanUserResizeColumns="True" CanUserReorderColumns="True" CanUserSortColumns="True" HeadersVisibility="All"
          RowBackground="#1000"
          RowHeaderWidth="40"
          AlternatingRowBackground="#1fff">
  <DataGrid.Columns>
    <!-- Using HeaderTemplate -->
    <DataGridTextColumn Header="Country" HeaderTemplate="{StaticResource Demo.DataTemplates.CountryHeader}" Binding="{Binding Name}" />
    <!-- CompiledBinding example of usage. -->
    <DataGridTextColumn Header="Region" Binding="{CompiledBinding Region}"  x:DataType="local:Country" />
    <DataGridTextColumn Header="Population" Binding="{Binding Population}"  />
    <DataGridTextColumn Header="Area" Binding="{Binding Area}" />
    <DataGridTextColumn Header="GDP" Binding="{Binding GDP}" CellStyleClasses="gdp"
                        MinWidth="200"
                        IsVisible="{Binding #ShowGDP.IsChecked}"/>
  </DataGrid.Columns>
</DataGrid>

Expected behavior
No cell is clipped

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Version latest master, 0.10.15

Additional context
I haven't find the root cause yet. Any hint is welcome.

@timunie
Copy link
Contributor Author

timunie commented Jul 15, 2022

Update: I've investigated this issue further. And I've noticed, that if you are using groups the group header will overlay the row headers. Is this maybe related?

image

I've still not found a solution for this issue unfortunately.

@timunie
Copy link
Contributor Author

timunie commented Jul 15, 2022

Update 2: I finally think I found the issue. Will send a PR soon.

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

Successfully merging a pull request may close this issue.

2 participants