I must have something whacky going on, since this is such a simple example yet I haven't seen anyone raise this problem yet.
I have a simple XamDataGrid, bound to a source with three simple items. Grid comes up fine, but if you click on the vertical down scroll, the control gets taller than the screen (easy to see if you have Window SizeToContent="WidthAndHeight").
<Window x:Class="WpfApplication2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="SimpleXamDataGrid" SizeToContent="WidthAndHeight" xmlns:igDP="http://infragistics.com/DataPresenter"> <StackPanel> <StackPanel.Resources> <XmlDataProvider x:Key="testData" XPath="Benefits"> <x:XData> <Benefits xmlns=""> <Benefit> <Description>Benefit1</Description> </Benefit> <Benefit> <Description>Benefit2</Description> </Benefit> <Benefit> <Description>Benefit3</Description> </Benefit> </Benefits> </x:XData> </XmlDataProvider> </StackPanel.Resources> <igDP:XamDataGrid x:Name="xdg1" DataSource="{Binding Source={StaticResource testData}, XPath=Benefit}"> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="Description" Label="Benefit Description"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid> </StackPanel> </Window>
This has alrready been fixed. You should contact support so you can be notified when the hotfix is available.
I am simply using the XamDataGrid in the content portion of the XamRibbonWindow and the grid blows out the type and is obscured by the Ribbon. So basically, the same problem. When is the fix slated? Until then I will try the posted workaround.
Hi,
I have a simple xamdatagrid control in a usercontrol and in that usercontrol I have binded the height propety of xamdatagrid with my customised property. When I set the height property dynamically scrollbars doesn't get displayed. Please anyone can help me.
<UserControl.Resources>
<!--XamDataGrid Style-->
<Style x:Key="XamDataGridStyle"
TargetType="{x:Type igDP:XamDataGrid}">
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Theme"
Value="Office2k7Blue" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
<Setter Property="VerticalAlignment"
<Setter Property="Width"
Value="Auto" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="VerticalContentAlignment"
<Setter Property="FontFamily"
Value="Verdana" />
<Setter Property="FontSize"
Value="10" />
<Setter Property="Foreground"
Value="Black" />
<Setter Property="BorderBrush"
<Setter Property="AutoFit"
Value="True" />
<Setter Property="RecordLoadMode"
Value="PreloadRecords" />
<Setter Property="GroupByAreaLocation"
Value="AboveDataArea" />
</Style>
</UserControl.Resources>
<StackPanel>
<Label Name="lblCaption" />
<!--<ScrollViewer Height="{Binding Path=ScrollHeight}" ScrollViewer.HorizontalScrollBarVisibility="Auto" Margin="0,5,0,0">-->
<igDP:XamDataGrid x:Name="xdgGrid" Height="{Binding Path=ScrollHeight}"
Style="{StaticResource XamDataGridStyle}"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Settings>
<igDP:FieldLayoutSettings AutoGenerateFields="False"
AddNewRecordLocation="OnTopFixed" />
</igDP:FieldLayout.Settings>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
<!--</ScrollViewer>-->
</UserControl>
This problem also exists if you are in a hierarchal set and your last set is empty as in has not items in it.
I am also having this problem. Is this bug scheduled to be fixed?