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

Header columns not aligning with data columns #188

Open
RichLamb opened this issue Jun 19, 2024 · 1 comment
Open

Header columns not aligning with data columns #188

RichLamb opened this issue Jun 19, 2024 · 1 comment

Comments

@RichLamb
Copy link

ColumnAlign

Hi,
I am just starting with this and have mimicked the sample code using columns from data in my application. I've noticed that (on Windows), the column headers do not align with the data, as shown in the attached screen shot.

Is there something I'm doing wrong in the setup of the grid. Below is the datagrid definition in the xaml file.

<dg:DataGrid x:Name="dataGrid" Grid.Row="1" RowTappedCommand="{Binding RowSelected}" SelectionMode="Single"
ActiveRowColor="LightBlue">
dg:DataGrid.Columns
<dg:DataGridColumn Title="Peak 1 (keV)" PropertyName="Peak1" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="Peak 2 (keV)" PropertyName="Peak2" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="eV/ch" PropertyName="EVch" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="Gain" PropertyName="Gain" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="Offset" PropertyName="Offset" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="P1 Calc (keV)" PropertyName="P1Calc" SortingEnabled="false"></dg:DataGridColumn>
<dg:DataGridColumn Title="P2 Calc (keV)" PropertyName="P2Calc" SortingEnabled="false"></dg:DataGridColumn>
</dg:DataGrid.Columns>
</dg:DataGrid>

Thanks,
Rich

@symbiogenesis
Copy link
Collaborator

If you're still having this problem, maybe you could create a sample repository showing the issue. I'm not able to reproduce this.

Make sure you are on .NET 8 with the latest version of both MAUI and this library, as there have been lots of bugs historically.

The only misaligned columns issue I'm aware of is if you try to set any column widths to Auto.

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

No branches or pull requests

2 participants