Hi,
i have a RadComboBox where the ItemsSource is bound to a list of strings, the Text to a String and where IsEditable is true.
When setting the Text (in viewmodel) to a value, which is not included in the list of strings, it shows the "suggested" text (like when i enter it manually in the box), not the text which was set.This occurs when the viewmodel value is set delayed (not in ctor).
Here is a small sample code.
MainWindow.xaml
<Window x:Class="TelerikCombobox.MainWindow" xmlns:local="clr-namespace:TelerikCombobox" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> <StackPanel Margin="3"> <telerik:RadComboBox Text="{Binding SelectedValue, Mode=TwoWay}" ItemsSource="{Binding SuggestedValues}" IsEditable="True"/> <TextBlock Text="{Binding SelectedValue, Mode=OneWay}"/> </StackPanel> </Grid></Window>
MainWindow.cs
public partial class MainWindow : Window{ public MainWindow() { InitializeComponent(); this.DataContext = new ViewModel() { SuggestedValues = new String[] { "100", "200", "300" }, }; SetValueDelayed(); } private async void SetValueDelayed() { await Task.Delay(2000); if (this.DataContext is ViewModel viewModel) viewModel.SelectedValue = "3"; }}
ViewModel.cs
public class ViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private String m_SelectedValue; public String SelectedValue { get { return m_SelectedValue; } set { m_SelectedValue = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SelectedValue))); } } private IEnumerable<String> m_SuggestedValues; public IEnumerable<String> SuggestedValues { get { return m_SuggestedValues; } set { m_SuggestedValues = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SuggestedValues))); } } }
After the value "3" is set, the combobox shows 300.
Thanks
Hi,
I have this very simple style for my RadMaskedNumericInput control
<Style TargetType="telerik:RadMaskedNumericInput"> <Setter Property="SelectionOnFocus" Value="SelectAll"/> <Style.Triggers> <Trigger Property="IsEnabled" Value="True"> <Setter Property="Background" Value="Green"/> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Background" Value="Red"/> </Trigger> <Trigger Property="IsFocused" Value="True"> <Setter Property="Background" Value="Yellow"/> </Trigger> <Trigger Property="IsReadOnly" Value="True"> <Setter Property="Background" Value="Gray"/> </Trigger> </Style.Triggers></Style>
Everything works fine except when the control receives focus, the background color does not change (remains green). How come ?
Kind Regards,
Hans
radGridView1.Columns.Add(new GridViewCheckBoxColumn() { DataMemberBinding = new Binding("HasOrders"), UniqueName = "HasOrders3", Header = "Has Orders3" , AutoSelectOnEdit = true , EditTriggers = GridViewEditTriggers.Default | GridViewEditTriggers.CellClick });private void radGridView1_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e) { if (e.Cell.Column.UniqueName == "HasOrders3") { textBox3.Text = ((CheckBox)e.EditingElement).IsChecked.ToString(); } }
How do I have to configure the RadMaskedNumericInput Control so that:
1. the user can enter any decimal number with any precision, with or without a decimal separator, positive or negative
2. no mask placeholders or literals are visible (no _ and a the decimal separator only visible when the user actually entered one)

The style for my RadWindows is not being overriden from the default theme. I don't have the same issue with other telerik controls like RadButton, the style gets set fine for them. Why is this happening? How can I set a RadWindow style?
MyWindow.xaml
<telerik:RadWindow x:Class="MyWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Header="My Window" <Grid> // window content <telerik:RadButton Content="OK" /> <telerik:RadButton Content="Cancel" /> </StackPanel> </Grid></telerik:RadWindow>
My App.Xaml file contains MergedDictionaries
<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Telerik/RadButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Telerik/RadWindow.xaml" /> </ResourceDictionary.MergedDictionaries></ResourceDictionary>
Here are the individual xaml files
RadWindow.xaml
<ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Style TargetType="{x:Type telerik:RadWindow}"> <Setter Property="Background" Value="Green" /> </Style></ResourceDictionary>
RadButton.xaml
<ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Style TargetType="{x:Type telerik:RadButton}"> <Setter Property="Background" Value="Blue" /> </Style></ResourceDictionary>
Hello,
In my application I need to update the ItemsSource every few seconds, I would like to know what would be the best way to perform this.
I might have up to 600 items divides
I have an ObervableCollection object, every time I receive new data I clear the ObervableCollection object and then I add the new data, something like this:
ObservableCollection<myData> myCollection = new ObservableCollection<myData>(); // Format the data the way I need it myCollection.Clear(); foreach (myObject item in DataObject){ myCollection.Add(new myData() { property1 = item.property1, property2 = item.property2, property3 = item.property3 // Operations for other properties });}I wonder if it would be better to update my ObervableCollection object (update existing items, add the new ones, and delete those that no longer exist) than clear and add all again.
What I want to achieve is to reduce the rendering time.
I hope you can give me some advice.
Thanks in advance,
Alberto

Hi,
I have populated the MultiColumnComboBox DropDown Items using a DataTable
I would like to preselect the SelectedItems onload, so that they are hilited in the DropDown Box, and the corresponding Display-values are shown in the select textbox.
Adding DataRows to the SelectedItems property seams to do the trick for the DropDown List, but the values are not shown in the select textbox.
How do I trigger the select textbox to be filled (with multible values)?
/Brian

Hello.
I found something unknown while using the hierarchical menu.
Click the hierarchical menu and click the ESC or menu to hide the hierarchical menu.
I made it short as a gif, but I hope it helps you understand.
Attach the source. What is the problem.
Xaml
<Grid> <Grid.Resources> <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" /> <Style x:Key="BaseNavigationViewItemStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource RadNavigationViewItemStyle}"> <Setter Property="DisplayMemberPath" Value="Title" /> <Setter Property="Icon" Value="{Binding Glyph}" /> <Setter Property="IconTemplate"> <Setter.Value> <DataTemplate> <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" /> </DataTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="NavigationSubItemStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource BaseNavigationViewItemStyle}"> <Setter Property="IconVisibility" Value="Collapsed" /> </Style> </Grid.Resources> <telerik:RadNavigationView Grid.Row="1" CanKeyboardNavigationSelectItems ="True" CompactPaneWidth="60" AutoChangeDisplayMode="False" DisplayMode="Expanded" DisplayMemberPath="Title" PaneHeader ="{Binding Header, Mode=OneTime}" ItemsSource ="{Binding Menu1}" SelectedItem ="{Binding MenuItem1, Mode=TwoWay}" > <telerik:RadNavigationView.ItemContainerStyle> <Style TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource BaseNavigationViewItemStyle}"> <Setter Property="ItemsSource" Value="{Binding SubItems}" /> <Setter Property="ItemContainerStyle" Value="{StaticResource NavigationSubItemStyle}" /> </Style> </telerik:RadNavigationView.ItemContainerStyle> <telerik:RadNavigationView.Content> <ContentControl Content="{Binding ViewContent, Mode=TwoWay}"/> </telerik:RadNavigationView.Content> </telerik:RadNavigationView> </Grid>
ViewModel
private void Data() { var multiBatchView = new MultiBatchView(); Menu1.Add(new navi { Glyph = "", Title = "Multi File Check", TypeUserControl = multiBatchView, }); Menu1.Add(new navi { Title = "Settings", Glyph = "", TypeUserControl = null, SubItems = new ObservableCollection<navi> { new navi { Title = "Test", TypeUserControl = null, }, new navi { Title = "Overlap", TypeUserControl = optionOverlapView, }, new navi { Title = "Connection", TypeUserControl = optionConnectionView }, new navi { Title = "Quality", TypeUserControl = optionQualityView }, new navi { Title = "Export/Import", TypeUserControl = optionExportImportView }, } }); MenuItem1 = Menu1.FirstOrDefault(); }
Model
public class navi{ public string Glyph { get; set; } public string Title { get; set; } public UserControl TypeUserControl { get; set; } public ObservableCollection<navi> SubItems { get; set; }}
Thanks.

Hi,
Below is my code snippet for RadComboBox that I am using:
<telerik:RadComboBox ItemsSource="{Binding xyz}"
IsEnabled="False"
IsEditable="False"
HorizontalAlignment="Stretch"
SelectedIndex="1"
Width="Auto">
When I apply the below style to change foreground color when disabled, it is not working:
<telerik:RadComboBox.TextBoxStyle>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</telerik:RadComboBox.TextBoxStyle>
This trigger only works when I set IsEditable-"True" and IsFilteringEnabled="True"
Is there any way that I can change the font color even when IsEditable-"False"?
Thanks,
Aanchal

In order to make the Slider handles "active" I have to click on a selection Thumb (start or end) then the handles become active and I can user them to increase/decrease incrementally.
Is this "by design"? If so, is there a way to prevent this default behavior and always have the Handles "active" (clickable)?
Cheers, Rob.
