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

DataGridCell content bounding box does not grow if content is longer than the initial cell width #4913

Open
2 of 14 tasks
aliveli186 opened this issue Jul 26, 2023 · 3 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control

Comments

@aliveli186
Copy link

aliveli186 commented Jul 26, 2023

Describe the bug

If the initial cell width is smaller than the content length of a DataGridCell the content bounding box doesn't grow to show the whole content when the cell width is increased by the user.

Regression

No response

Reproducible in sample app?

  • This bug can be reproduced in the sample app.

Steps to reproduce

<controls:DataGrid x:Name="RunningTasks"
				   AutoGenerateColumns="False"
				   GridLinesVisibility="Horizontal"
				   HorizontalGridLinesBrush="Black"
				   ItemsSource="{x:Bind ViewModel.Source, Mode=OneWay}"
				   IsReadOnly="True"
				   SelectionMode="Single"
				   Height="160">
	<controls:DataGrid.Columns>
		<controls:DataGridTextColumn
			Binding="{Binding Points, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0:N0}'}"
			Header="Points" />
	</controls:DataGrid.Columns>
</controls:DataGrid>

Expected behavior

If the cell width is 100px and its content's width is 200px and when the user expands the column to see the whole content the bounding box around the content should grow to 200px, towards the direction where it is aligned to, to show the whole content. Currently it stays at 100px and doesn't grow, truncates the content.

Screenshots

image

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

17.6.5

Device form factor

Desktop

Nuget packages

<ItemGroup>
	<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
	<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
	<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
	<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0-preview.6.23329.7" />
	<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.230628000-preview1" />
	<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25387-preview" />
	<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

Additional context

No response

Help us help you

No.

@aliveli186 aliveli186 added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jul 26, 2023
@ghost ghost added the needs triage 🔍 label Jul 26, 2023
@ghost
Copy link

ghost commented Jul 26, 2023

Hello aliveli186, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@ghost ghost added the needs attention 👋 label Aug 13, 2023
@ghost
Copy link

ghost commented Aug 13, 2023

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

1 similar comment
@ghost
Copy link

ghost commented Aug 28, 2023

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control
Projects
None yet
Development

No branches or pull requests

2 participants