I have a xamldatagrid with two lines in each row. If i drag a column to a new position, only the header and data in the first row is moved, data in the second row stays in the previous position as though no dragging have happened. Pasted below is the xaml. It is not the complete xaml, but i think this should be good enough to reproduce the issue. I can send you the complete xaml if needed.
I am also attaching the screen shot of the issue showing the screen before and after dragging the column. In addition to that, an empty row (space) is introduced between the first and second rows in one of the columns.
Any help is greatly appreciated
<igDP:XamDataGrid
Name="BucketGrid" Theme="Office2k7Black" Background="Transparent" GroupByAreaLocation="None" AutoFit="true" Style="{DynamicResource PerformantGrid}" DataSource="{Binding Buckets}"> <igDP:XamDataGrid.Resources> <ResourceDictionary> <Style TargetType="{x:Type igDP:LabelPresenter}" BasedOn="{x:Static Themes:DataPresenterOffice2k7Black.LabelPresenter}"> <Style.Triggers> <Trigger Property="SortStatus" Value="Ascending"> <Setter Property="Foreground" Value="#ffff00"/> </Trigger> <Trigger Property="SortStatus" Value="Descending"> <Setter Property="Foreground" Value="#ffff00"/> </Trigger> </Style.Triggers> </Style> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/GLM.Infrastructure.View;component/Themes/XamDataGrid.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AllowAddNew="False" AutoArrangeCells="Never" SelectionTypeRecord="Single" AllowDelete="False" AutoGenerateFields="False" RecordSelectorLocation="None" HighlightAlternateRecords="True" ReevaluateFiltersOnDataChange="True" SupportDataErrorInfo="RecordsAndCells" DataErrorDisplayMode="ErrorIconAndHighlight" DataRecordCellAreaStyle="{StaticResource HighlightedDataRecordCellAreaStyle}" ExpansionIndicatorDisplayMode="CheckOnDisplay" HeaderPlacement="OnTopOnly" HeaderPlacementInGroupBy="OnTopOnly" CopyFieldLabelsToClipboard="True" AllowClipboardOperations="All"> </igDP:FieldLayoutSettings> </igDP:XamDataGrid.FieldLayoutSettings>
<!--Width="Auto" AllowResize="True"-->
<igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowSummaries="True" Width="Auto" SummaryDisplayArea="TopFixed" ExpandableFieldRecordExpansionMode="ExpandAlways" ExpandableFieldRecordHeaderDisplayMode="NeverDisplayHeader" LabelTextWrapping="NoWrap" CellClickAction="SelectCell" AllowEdit="False" AllowFixing="No" AllowRecordFiltering="True" LabelClickAction="SortByOneFieldOnly" CellValuePresenterStyle="{StaticResource CellValuePresenterStyle}"/> </igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout IsDefault="True"> <igDP:FieldLayout.SortedFields> <igDP:FieldSortDescription FieldName="TotalUtilizationReject" Direction="Descending" /> </igDP:FieldLayout.SortedFields>
<igDP:FieldLayout.Fields> <igDP:UnboundField Row="0" Column="0" Name="TotalUtilizationReject" BindingPath="TotalUtilizationReject" Label="TotalUtilization" Visibility="Collapsed"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" /> </igDP:Field.Settings> </igDP:UnboundField> <igDP:UnboundField Row="0" Column="1" Name="Name" BindingPath="message" Label="Bucket Name"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" /> </igDP:Field.Settings> </igDP:UnboundField> <igDP:UnboundField Row="0" Column="2" Name="BucketId" BindingPath="limitId" Label="Bucket Id" Visibility="Visible"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" /> </igDP:Field.Settings> </igDP:UnboundField>
<igDP:UnboundField Row="0" Column="3" BindingPath="OrderCountUtilizationReject" Tag="Format=N0,CheckLevel=Reject" Name="OrderCount" Label="OrderCount"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellValuePresenterStyle="{StaticResource DynamicUtilizationFieldCellStyle}"> </igDP:FieldSettings> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="OrderCountcurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="1" Column="3" BindingPath="OrderCountmaxValue" Tag="Format=N0,CheckLevel=Reject" Name="OrderCountMaxValue" Label="{x:Null}"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellContentAlignment="ValueOnly" AllowRecordFiltering ="False" CellValuePresenterStyle="{StaticResource HighWaterMarkCellStyle}"/> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="OrderCountcurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="0" Column="4" Name="NetOrderQty" Tag="Format=N0,CheckLevel=Reject" BindingPath="NetOrderQtyUtilizationReject" Label="NetOrderQuantity"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellValuePresenterStyle="{StaticResource DynamicUtilizationFieldCellStyle}"> </igDP:FieldSettings> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="NetOrderQtycurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="1" Column="4" BindingPath="NetOrderQtymaxValue" Tag="Format=N0,CheckLevel=Reject" Name="NetOrderQtyMaxValue" Label="{x:Null}"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellContentAlignment="ValueOnly" AllowRecordFiltering ="False" CellValuePresenterStyle="{StaticResource HighWaterMarkCellStyle}"/> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="NetOrderQtycurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="0" Column="5" Name="GrossOrderQty" Tag="Format=N0,CheckLevel=Reject" BindingPath="GrossOrderQtyUtilizationReject" Label="GrossOrderQuantity"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellValuePresenterStyle="{StaticResource DynamicUtilizationFieldCellStyle}"> </igDP:FieldSettings> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="GrossOrderQtycurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="1" Column="5" BindingPath="GrossOrderQtymaxValue" Tag="Format=N0,CheckLevel=Reject" Name="GrossOrderQtyMaxValue" Label="{x:Null}"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellContentAlignment="ValueOnly" AllowRecordFiltering ="False" CellValuePresenterStyle="{StaticResource HighWaterMarkCellStyle}"/> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="GrossOrderQtycurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="0" Column="6" Name="NetNotionalValue" BindingPath="NetNotionalValueUtilizationReject" Label="NetNotionalValue"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellValuePresenterStyle="{StaticResource DynamicUtilizationFieldCellStyle}"> </igDP:FieldSettings> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="NetNotionalValuecurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> <igDP:UnboundField Row="1" Column="6" BindingPath="NetNotionalValuemaxValue" Tag="CheckLevel=Reject" Name="NetNotionalValueMaxValue" Label="{x:Null}"> <igDP:Field.Settings> <igDP:FieldSettings AllowSummaries="False" CellContentAlignment="ValueOnly" AllowRecordFiltering ="False" CellValuePresenterStyle="{StaticResource HighWaterMarkCellStyle}"/> </igDP:Field.Settings> <igDP:Field.Visibility> <MultiBinding Converter="{StaticResource LimitFieldVisibilityConverter}" ConverterParameter="NetNotionalValuecurrValue"> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="." /> <Binding Source="{StaticResource DATA_BucketViewModel}" Path="FieldVisibilityChanged" /> </MultiBinding> </igDP:Field.Visibility> </igDP:UnboundField> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts>
Thanks
Shahin
Hello Shahin,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Hello Shahin ,
After looking into the functionality that you are trying to achieve and researching it, it has been determined to be a new product idea. You can suggest new Product Ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Steps to create your idea:
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
Hi Krasimir
Sorry for not responding promptly. Your answer could solve the problem, but i am wondering isnt there any simple way to do this without resorting to listening to events? Cant Xamdatagrid automatically do this for us, because it already knows they are all in the same column even if they are multi rows within the same row? Afterall it does the column move just fine when there is only a single row per cell. Please advice
I have been looking into the behavior that you are getting and it seems to be expected. You have defined several UnboundFields and using the Row and Column properties with the AutoArrangeCells set to Never and you have positioned the fields in two rows. Also, you have hide the labels of the fields in the second row. When you switch the positions of two fields in the first row of fields , you are affecting only those two fields (field “OrderCount” and field “GrossOrderQuantity”) and the fields in the second row ( “OrderCountMaxValue” and “GrossOrderQtyMaxValue”, which have not LabelPresenters) are keeping their original positions, since you are not interacting with them. If you wish to move the fields in both levels, when you drag the LabelPresenter in the first row, you can use the FieldPositionChanging and FieldPositionChanged events to implement custom logic for keeping the fields in the two rows synchronized, by changing the position of the fields in the second row. You can find more details on the two events here: http://help.infragistics.com/Doc/WPF/current/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v13.2~Infragistics.Windows.DataPresenter.DataPresenterBase~FieldPositionChanging_EV.html, http://help.infragistics.com/Doc/WPF/current/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v13.2~Infragistics.Windows.DataPresenter.DataPresenterBase~FieldPositionChanged_EV.html.
Please let me know if you need any further question on the matter.