Hi support
, I have a drop down column 'X' in my xamdatagrid .In design i have not declared any style for this. I am dynmically attaching a xamcomboeditor to the column "X" on click of a button at runtime and later on removing the style. Now the drop down has display member path as "description" and value path as "id". when i remove the style , the id value is shown in the grid field "X"instead of description.any soluyion for this
Hi,
I have opened a new case for this.Sorry for posting here.I forgot the rules
Hi, Thanks for the help. Can you help me in another case. I have two radio button columns in my grid. on select of one i need to clear another. Currently i have done that. But the problem is i have an event set for one radio button to clear another (when one is clicked) .Now , when i scroll out , go down and scroll in , the last selection is getting cleared.Basically the checked event for the radio button is getting called which clears of the other value.
My radio button declaration are : -
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="Clear"> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <Border BorderBrush="Silver" BorderThickness="1"> <RadioButton IsChecked="{Binding DataItem.Clear, Mode=TwoWay}" IsEnabled="{Binding DataItem.EnableClearRadioButton,Mode=TwoWay}" Checked="Clear_Checked" Name="Clear" Padding="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </RadioButton> </Border> </ControlTemplate> </Setter.Value> </Setter>
<Setter Property="Foreground" Value="Black"/> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderBrush" Value="Silver"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <Border BorderBrush="Silver" BorderThickness="1"> <RadioButton IsChecked="{Binding DataItem.Waive, Mode=TwoWay}" IsEnabled="{Binding DataItem.EnableWaiveRadioButton,Mode=TwoWay}" Padding="{TemplateBinding Padding}" Checked="Waive_Checked" Name="Waive" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </RadioButton> </Border>
</ControlTemplate> </Setter.Value> </Setter> </Style>
<igDP:Field Name="Clear" Label="Clear" Width="70" DataType="{x:Type System:Boolean}" FixedLocation="FixedToNearEdge"> <igDP:Field.Settings> <igDP:FieldSettings CellWidth="70" LabelWidth="70" LabelTextAlignment="Center" AllowRecordFiltering="False" LabelTextTrimming="CharacterEllipsis" CellValuePresenterStyle="{StaticResource Clear}"> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Waive" Label="Waive" Width="70" DataType="{x:Type System:Boolean}" FixedLocation="FixedToNearEdge"> <igDP:Field.Settings> <igDP:FieldSettings CellWidth="70" LabelWidth="70" LabelTextAlignment="Center" AllowRecordFiltering="False" LabelTextTrimming="CharacterEllipsis" CellValuePresenterStyle="{StaticResource Waive}" /> </igDP:Field.Settings> </igDP:Field>
Now in the code behind,
i have the following code:
private void Waive_Checked(object args, RoutedEventArgs e) { var vm = this.DataContext as WIPManagementUtilityViewModel; if (vm != null && vm.ToggleChecked.CanExecute(null) && this.xamdgExceptions.ActiveRecord != null) { (this.xamdgExceptions.ActiveRecord as DataRecord).Cells["Clear"].Value = false; // vm.ToggleChecked.Execute(null);
} } private void Clear_Checked(object args, RoutedEventArgs e) { var vm = this.DataContext as WIPManagementUtilityViewModel; if (vm != null && vm.ToggleChecked.CanExecute(null) && this.xamdgExceptions.ActiveRecord != null) { (this.grid.ActiveRecord as DataRecord).Cells["Waive"].Value = false; //vm.ToggleChecked.Execute(null);
} }
Please help
HI Raja,
I used a converter and a parameter to do the conversion after the XamComboBox is removed.
Please review my sample.
Sincerely, Matt Developer Support Engineer
I am reviewing your issue.
Sincerely,
Matt
Developer Support Engineer
Any Solution. I have this thing hanging above me. so just enquiring if anyone had a chance to look.