Hello,
we currently face the problem, that the datagrid doesn´t recognize the available space for it on 64 bit systems and overflows the layout without scrollbars.
You find screenshots attached, how it should be (and is on 32bit systems) --> 32bit.jpg (attached to next post) and how it is on 64bit systems --> 64bit.jpg
Following you find the corresponding code for the datagrid.
<UserControl x:Class="JVS.View.DataGrids.DataGridErlegung" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:igEditors="http://infragistics.com/Editors" xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"> <DockPanel Name="dp" Width="Auto" Height="Auto"> <igDP:XamDataGrid DockPanel.Dock="Top" Height="Auto" Margin="0" Name="dgErlegung" Width="Auto" Theme="Onyx" GroupByAreaStyle="{StaticResource ResourceKey=MyCustomGroupByArea}"> <igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="WrapField"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <TextBlock Margin="{TemplateBinding Padding}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" TextWrapping="Wrap" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Center" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:XamDataGrid.Resources> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False"> </igDP:FieldLayoutSettings> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="Wildart" Label="Wildart"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Revier" Label="Revier"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Erlegungsdatum" Label="Erlegungsdatum"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Hochsitz" Label="Hochsitz"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Erleger" Label="Erlegt von"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Anzahl" Label="Anzahl"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Bejagungsart" Label="Bejagungsart"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Gewicht" Label="Gewicht"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Alter" Label="Alter"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Geschlecht" Label="Geschlecht"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Waffe" Label="Waffe"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Falle" Label="Falle"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Schussentfernung" Label="Schussentfernung"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Fluchtstrecke" Label="Fluchtstrecke"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="TrophLaenge" Label="Trophäenlänge"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Trophgewicht" Label="Trophäengewicht"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="TrophNotiz" Label="Trophäennotiz"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Treffersitz" Label="Treffersitz"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Haematome" Label="Hämatome"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="VerlOrgane" Label="Verletzte Organe"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Fallwild" Label="Fallwild"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Todesursache" Label="Todesursache"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Eigenverbrauch" Label="Eigenverbrauch"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Erloes" Label="Erlös Wildbret"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Bemerkung" Label="Bemerkung"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" CellValuePresenterStyle="{StaticResource WrapField}" CellWidth="600"/> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid> <StackPanel DockPanel.Dock="Top" Background="White"> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"> <Button Name="btnNeu" Style="{StaticResource ButtonNeu}" Width="110">Erlegung anlegen</Button> <Button Name="btnExport" Style="{StaticResource ButtonNeu}" Width="90">Export Excel</Button> <Button Name="btnDrucken" Style="{StaticResource ButtonNeu}" Width="80">Drucken</Button> </StackPanel> </StackPanel> </DockPanel></UserControl>
With kind regards
Frank
Sorry, you´re right, it´s the wron xaml code, I´ve changed the screens and forgot to change the code too. Heres the right code:
<UserControl x:Class="JVS.View.DataGrids.DataGridHochsitz" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:igEditors="http://infragistics.com/Editors" xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"> <DockPanel Name="dp" Width="Auto" Height="Auto"> <igDP:XamDataGrid DockPanel.Dock="Top" Height="Auto" Margin="0" Name="dgHochsitz" Width="Auto" Theme="Onyx" GroupByAreaStyle="{StaticResource ResourceKey=MyCustomGroupByArea}"> <igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="WrapField"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <TextBlock Margin="{TemplateBinding Padding}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" TextWrapping="Wrap" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Center" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:XamDataGrid.Resources> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False"> </igDP:FieldLayoutSettings> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="Bezeichnung" Label="Bezeichnung"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Baujahr" Label="Baujahr"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="FlurstueckNr" Label="Flurstücknummer"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Bauart" Label="Bauart"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Zustand" Label="Zustand"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True"/> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Bemerkung" Label="Bemerkung"> <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" AllowResize="True" CellValuePresenterStyle="{StaticResource WrapField}" CellWidth="600"/> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid> <StackPanel DockPanel.Dock="Top" Background="White"> <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center"> <Button Name="btnNeu" Style="{StaticResource ButtonNeu}" Width="110">Hochsitz anlegen</Button> <Button Name="btnExport" Style="{StaticResource ButtonNeu}" Width="90">Export Excel</Button> <Button Name="btnDrucken" Style="{StaticResource ButtonNeu}" Width="80">Drucken</Button> </StackPanel> </StackPanel> </DockPanel></UserControl>
"Overflows layout" means, that if there are too much rows to display them in the window, the datagrid is not shown totally and the buttons in the stackpanel at the bottom are even not reachable for the user because of the missing scrollbar. The different content in the screenshots doesn´t matter, we have many users with arbitrary content, that face the problem, the amount of rows is the problem. And the problem does only show up on 64 bit systems.
I'm not sure what you mean by "overflows layout". From the screenshot it looks like the fields have the same extent and it looks like the screenshots are of different data - i.e. you have different selected criteria in the ribbon - so a scrollbar may not be needed based on the selection. What does the 64 app look like when you have the same data selected that you have in the 32 bit screenshot? BTW the only field that I see in the xaml that matches to what's in the ui is the only labelled "Bemerkung". Is that definitely the correct xaml or are you creating field in code and if so how are those being set up? Note the grid itself doesn't know or care about whether its 32/64 bit.
No idea?
Screenshot 32bit