Hi All
I have a WPF RadComboBox within a RadDataForm as per below - however whenever I press "insert" on my keyboard the data on the form disappears.
I have tried to handle the "Insert" keypress in the keydown and keyup events but to no avail, it doesn't drop in there - I need to be prevent the form data from disappearing when the insert key is pressed.
Is there a way to disable a certain key from being pressed?
Please help ASAP.
Ram
<telerik:RadDataForm.EditTemplate> <DataTemplate> <Grid> <StackPanel Margin="10,10,30,10"> <!--<telerik:DataFormDataField DataMemberBinding="{Binding Name,Mode=TwoWay}" Label="Name" FontWeight="Bold" IsEnabled="True" Width="580" LostFocus="event_OnIngredientNameLostFocus"> </telerik:DataFormDataField>--> <StackPanel Orientation="Horizontal" Margin="0,0,0,10"> <TextBlock KeyDown="RadComboBox_KeyDown" FontWeight="Bold" Margin="10,0,0,0" Text="Name" Width="180"/> <telerik:RadComboBox ItemsSource="{Binding Glossary}" SelectionChanged="event_OnIngredientNameSelectionChanged" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" LostFocus="event_OnIngredientNameLostFocus" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" KeyDown="RadComboBox_KeyDown" KeyUp="RadComboBox_KeyUp" IsTextSearchEnabled="True" IsEditable="True" Width="355"> <telerik:RadComboBox.ToolTip> <Border BorderThickness="1" BorderBrush="{StaticResource ThemeAccent}"> <Grid Background="#FFF3C6" MaxWidth="260" MinWidth="100" Height="Auto"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="1" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock Margin="3" TextOptions.TextFormattingMode="Display" Text="Ingredient Name" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Height="Auto" FontSize="14" FontWeight="SemiBold" HorizontalAlignment="Left" /> <Rectangle Grid.Row="1" Height="1" HorizontalAlignment="Stretch" Margin="3,0" Fill="{StaticResource ThemeStripe}" /> <TextBlock Margin="3" TextOptions.TextFormattingMode="Display" TextAlignment="Left" Grid.Row="2" Text="Start typing to select the ingredient or additive name from the glossary" TextWrapping="Wrap" Height="Auto" FontSize="12" FontWeight="Normal" HorizontalAlignment="Left" /> </Grid> </Border> </telerik:RadComboBox.ToolTip> <telerik:RadComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </telerik:RadComboBox.ItemsPanel> </telerik:RadComboBox> </StackPanel> <telerik:DataFormDataField DataMemberBinding="{Binding RefCode,Mode=TwoWay}" Label="Ref Code" IsEnabled="True" Width="580"> </telerik:DataFormDataField> </StackPanel> </Grid> </DataTemplate> </telerik:RadDataForm.EditTemplate> </telerik:RadDataForm>