Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2940
Xamdatagrid selection problem.
posted

Hi... I am using xamdatagrid in which there is a problem in selection.I will retrieve all fields from database and i changing order of the fields using up and down button.When i send the field up or down and field which i have sent up will be selected same as selected background brush and i selection will remain as it is.It will be bit confusing.I am sending xaml code which is below.

 

<igDP:XamDataGrid Name="RoleDataGrid" DataSource="{Binding SortedItems}" UpdateMode="OnRecordChange" AutoFit="True"        ActiveDataItem="{Binding SelectedChecklistItem,Mode=TwoWay}" Grid.Row="3"     Grid.ColumnSpan="2" MaxHeight="400" ScrollViewer.CanContentScroll="True"     GroupByAreaLocation="None" ScrollingMode="DeferredWithScrollTips" Theme="[Current]"                     ScrollViewer.VerticalScrollBarVisibility="Visible" Sorting="RoleDataGrid_Sorting">

<igDP:XamDataGrid.Resources>

<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="checkboxstyles">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">

<Editors:XamCheckEditor Name="Rolecombox"     IsChecked="{Binding DataItem.IsMandatory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"                                                HorizontalAlignment="Center" VerticalAlignment="Center" VerticalContentAlignment="Center">

</Editors:XamCheckEditor>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</igDP:XamDataGrid.Resources>

<igDP:XamDataGrid.FieldLayoutSettings>

<igDP:FieldLayoutSettings MaxSelectedCells="0" SelectionTypeRecord="Single" SelectionTypeCell="None" MaxSelectedRecords="1" AutoGenerateFields="False" AllowFieldMoving="No" HighlightAlternateRecords="False" SelectionTypeField="Single" FilterUIType="LabelIcons" HeaderPrefixAreaDisplayMode="FieldChooserButton" />

</igDP:XamDataGrid.FieldLayoutSettings>

<igDP:XamDataGrid.FieldSettings>

<igDP:FieldSettings AllowRecordFiltering="True" CellClickAction="SelectRecord" FilterLabelIconDropDownType="MultiSelectExcelStyle" SortComparisonType="CaseSensitive" FilterClearButtonVisibility="{x:Null}" AllowCellVirtualization="True" />

</igDP:XamDataGrid.FieldSettings>

<igDP:XamDataGrid.FieldLayouts>

<igDP:FieldLayout>

<igDP:FieldLayout.Fields>

<igDP:Field Name="Name" Label="Name" Width="200">

<igDP:Field.Settings>

<igDP:FieldSettings AllowEdit="False" />

</igDP:Field.Settings>

</igDP:Field>

<igDP:Field Name="Description" Label="Description" Width="200">

<igDP:Field.Settings>

<igDP:FieldSettings AllowEdit="False" />

</igDP:Field.Settings>

</igDP:Field>

<igDP:UnboundField Label="Mandatory" Width="200">

<igDP:UnboundField.Settings>

<igDP:FieldSettings AllowEdit="False" CellValuePresenterStyle="{StaticResource checkboxstyles}" />

</igDP:UnboundField.Settings>

</igDP:UnboundField>

</igDP:FieldLayout.Fields>

</igDP:FieldLayout>

</igDP:XamDataGrid.FieldLayouts>

</igDP:XamDataGrid>

And also i sending screen shot of theproblem xamdatagrid.Plz verify it.