In the xamDataGrid, I have the column size set to Auto, and resize set to true. I was hoping that when the form opened up, it would set the size via the Auto alogrithm, and then allow the user to move where the column edges are.
I can only get the column to move when I have the width not set to auto.
So, how does one go about getting the default to be auto, and allowing the user to grab a column and dynmically changing the width?
So the AutoFit="True" is causing the problem...what exactly does AutoFit then do?
Jack
I am binding a data table to this grid to generate the fields and supply all the data for the table:
Here is my xaml code.
<igDP:XamDataGrid
Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="12,0,0,0" Name="xamDataGrid1" Background="White" SortRecordsByDataType="False" AutoFit="True" Theme="Office2k7Black" IsGroupByAreaExpanded="True" SelectedItemsChanged="xamDataGrid1_SelectedItemsChanged"
GroupByAreaLocation="AboveDataArea">
<igDP:XamDataGrid.ViewSettings>
<igDP:GridViewSettings />
</igDP:XamDataGrid.ViewSettings>
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings
AllowRecordFiltering="true"Width="Auto" AllowSummaries="true" SummaryUIType="MultiSelect"SummaryDisplayArea="TopFixed" FilterStringComparisonType="CaseInsensitive"FilterOperatorDefaultValue="Equals" FilterClearButtonVisibility="Visible"CellClickAction="SelectRecord" AllowEdit="False" FilterOperandUIType="Combo" AllowResize="True"/>
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings
FilterUIType="LabelIcons" AutoGenerateFields="True"HighlightAlternateRecords="True" FilterRecordLocation="OnTopFixed"CalculationScope="FullUnsortedList" GroupBySummaryDisplayMode="SummaryCellsAlwaysBelowDescription"SummaryDescriptionVisibility="Visible" AllowAddNew="False" AllowDelete="False"SelectionTypeRecord="Single" HeaderPrefixAreaDisplayMode="FieldChooserButton"MaxSelectedRecords="1" SelectionTypeField="None" SelectionTypeCell="None" RecordFiltersLogicalOperator="And" />
</igDP:XamDataGrid.FieldLayoutSettings>
</igDP:XamDataGrid>
Thanks Jack
I've tested this behavior in a sample project and it looks fine to me with the following settings:
<igDP:XamDataGrid x:Name="xamDataGrid1">
<igDP:FieldLayoutSettings AutoGenerateFields="False"/>
<igDP:FieldSettings AllowResize="True"/>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="String" Width="Auto"/>
<igDP:Field Name="Integer" Width="Auto"/>
<igDP:Field Name="Double" Width="Auto"/>
<igDP:Field Name="Decimal" Width="Auto"/>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
By setting AllowResize to true and the width to Auto for all of the fields in the grid, I'm able to resize and move the fields.
Could you attach a sample that duplicates the issue or code snippet on the grid so I can look at it? Also which version and build are you using in your application?