Telerik Forums
UI for Silverlight Forum
7 answers
2.2K+ views
Getting error like "The tag 'RadComboBox' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation" this.

This is my coding


xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    mc:Ignorable="d"
    x:Class="Splendid.testing.StatusMap.UserControl1"
    d:DesignWidth="640" d:DesignHeight="480">

    <Grid x:Name="LayoutRoot">
        <telerik:RadComboBox Margin="276,0,201,194" VerticalAlignment="Bottom">
            <telerik:RadComboBoxItem Content="RadComboBoxItem" Height="100" Width="100"/>
            <telerik:RadComboBoxItem Content="RadComboBoxItem" Height="100" Width="100"/>
        </telerik:RadComboBox>
    </Grid>
Christy
Top achievements
Rank 1
Iron
 answered on 01 Sep 2021
2 answers
370 views

I started from the example in the demos.

Basically what is happening is that the template items render fine. Just when filtering is enabled everything disappears. Selecting the Item instead of typing causes the value to display the class type, not the TextSearch.TextPath.

What am I missing here?

<DataTemplate x:Key="ComboBoxCustomTemplate">
    <Grid Margin="0 3">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0">
            <Run Text="{Binding Distributor}"></Run>
            <Run >(</Run>
            <Run Text="{Binding Country}"></Run>
            <Run>)</Run>
        </TextBlock>
        <TextBlock Grid.Row="1" Foreground="LightGray" FontSize="10" Text="{Binding Region}" />
    </Grid>
</DataTemplate>


<telerik:RadComboBox x:Name="DistributorTextBox" Grid.Column="1" Grid.Row="2" ItemsSource="{Binding DistributorData}" VerticalAlignment="Center" EmptyText="Select Distributor" IsEditable="True"  Cursor="Hand" telerik:StyleManager.Theme="Windows7" Height="30" IsFilteringEnabled="True"  OpenDropDownOnFocus="True" TextSearchMode="StartsWith"  TextSearch.TextPath="Distributor" ItemTemplate="{StaticResource ComboBoxCustomTemplate}"  CanAutocompleteSelectItems="False"   />


I noticed that if I rip out the template, everything works as expected (filtering and selecting).

Don
Top achievements
Rank 1
 answered on 05 Jun 2020
6 answers
54 views
When the combo is open and you press a key, it scrolls to show the first item starting with that letter at the bottom of the list in the scrollviewer.  Typically you want to see that item and other items beginning with that letter, but the other items are off the bottom.  Is it possible to scroll the scrollviewer so that the highlighted row is as near the top of the scrollviewer as possible?
Petar Mladenov
Telerik team
 answered on 17 Jan 2020
13 answers
193 views

I am using the latest RadComboBox for Silverlight 4 and I am finding some memory leaks when I am binding it to my view model.


Here is my RadComboBox declaration:


 

 
<telerik:RadComboBox x:Name="rcbGender" ClearSelectionButtonVisibility="Visible" 
        ItemsSource="{Binding GenderList, Mode=OneWay}" 
        ClearSelectionButtonContent="Clear" SelectedValuePath="Key" DisplayMemberPath="Name"   
        SelectedValue="{Binding Gender, Mode=TwoWay}"/>  
 

The GenderList is a property of the viewmodel:

 

 
public IEnumerable<KeyValueDataItem> GenderList  
        {  
            get { return _genderList; }  
        }  
 

This is the KeyValueDataItem class

 

public class KeyValueDataItem  
    {  
        private string _key;  
        private string _name;  
 
        public KeyValueDataItem(string key, string name)  
        {  
            _key = key;  
            _name = name;  
        }  
 
        public string Name  
        {  
            get 
            {  
                return _name;  
            }  
             
        }  
        public string Key  
        {  
            get 
            {  
                return _key;  
            }  
             
        }  
    } 


Every time I open and close the page it stays in the memory and does not get clean up by GC. I spent a lot of time debugging it with WinDbg and narrowed it down to the RadComboBox causing this problem. When I removed the radcombobox and replaced it with Windows combobox that fixed the problem. I am using the radcombobox in my application a lot and wouldn't really want to replace it with other controls.

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Dec 2019
6 answers
815 views
I have set the IsEditable property to False, so the user can only select values from the list. Why would the backspace key allow the user to remove the selection?

I cannot find any way to prevent this behavior. In my opinion, this behavior would never be desirable, but at the very least there should be some way to turn it off.

Should I submit an issue for this?
Dilyan Traykov
Telerik team
 answered on 29 Oct 2019
6 answers
155 views


With the settings below, it always seems to auto complete for me.  Say I have a value of 20 (list of strings) in my combo box.  If I type '2'  a zero is always put after no matter what I set the CanAutocompleteSelectItems to .  It's also seems to work very differently on different computers sometimes showing the rest of the item selected, and sometimes not.  I'm working on reproducing more issues.  In one case some valid values are '1', '18' and if I type in a '1' and tab out it would give me 18 instead of 1.  I haven't been able to reproduce this on my machine yet.  It would also be nice if you just had an autocomplete box instead of having to guess on all the settings that change throughout different versions.

UPDATE: about '1', '18, if I change the order and but 18 before 1, that's when I get that error. Is there a way to do it without the order being like that?
    <telerik:RadComboBox x:Name="rc1" OpenDropDownOnFocus="False" Margin="5 0 0 0" IsReadOnly="False"
            LostFocus="rc1_LostFocus" SelectionChanged="rc1_SelectionChanged"
            CanAutocompleteSelectItems="False" ClearSelectionButtonVisibility="Visible"
            ClearSelectionButtonContent="Clear" Width="80" IsEditable="True">
 
</telerik:RadComboBox>

Dimitar Dinev
Telerik team
 answered on 16 Jul 2019
13 answers
1.8K+ views
I am using the combobox to achieve the autocomplete feature. As per the documentation i have set only the IsEnabled=true. Now in the datasource i have multiple items which have similar words like (Cooperation, Cooperatiove ...). Now when I start typing C, ideally it should display the first match in the combobox along with the rest of the matching items with 'C' in a dropdown kind of thing automatically.. but I am not able to see that. Can you please suggest, if I need to make any other changes.
Dinko | Tech Support Engineer
Telerik team
 answered on 19 Mar 2019
7 answers
488 views
Hi,
 within your combobox control, there is a functionality to scroll in the combobox item when the mouse is over a combobox even is the combobox doesn't have the focus.

Is there any way to remove this behavior, because if the client scroll down the screen or even hit the mouse wheel by error when the mouse is over a combobox, the data might change without the user seeing it.

I hope you have a way to disable this behavior because I couldn't find any.

Kalin
Telerik team
 answered on 04 Mar 2019
8 answers
124 views
After upgrading to RadControls for Silverlight Q2 2010 SP1 from RadControls for Silverlight Q1 2010
I started recieving the error listed below whenever I change the selection of the combobox.

Any Idea of what might cause that error ?

Thank you

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E)
Timestamp: Wed, 18 Aug 2010 20:13:40 UTC

Message: Unhandled Error in Silverlight Application
Code: 4004   

Category: ManagedRuntimeError      

Message: System.InvalidCastException: Unable to cast object of type 'Telerik.Windows.Controls.RadComboBoxAutomationPeer' to type 'System.Windows.Automation.Peers.SelectorAutomationPeer'.
   at Telerik.Windows.Controls.ListBoxItem.OnCreateAutomationPeer()
   at System.Windows.Automation.Peers.FrameworkElementAutomationPeer.CreatePeerForElement(UIElement element)
   at System.Windows.Automation.Peers.ItemsControlAutomationPeer.CreatePeerForIndex(Object item, Int32 index)
   at System.Windows.Automation.Peers.ItemsControlAutomationPeer.GetChildrenCore()
   at Telerik.Windows.Controls.Automation.Peers.SelectorAutomationPeer.GetChildrenCore()
   at Telerik.Windows.Controls.RadComboBoxAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.GetChildren()
   at Telerik.Windows.Controls.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e)
   at Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
   at Telerik.Windows.Controls.RadComboBox.SelectItemDelayedSelectionChanged(Object item)
   at Telerik.Windows.Controls.RadComboBox.NotifyComboBoxItemMouseUp(RadComboBoxItem comboBoxItem)
   at Telerik.Windows.Controls.RadComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)    

Line: 54
Char: 13
Code: 0

Jonathan
Top achievements
Rank 1
Veteran
 answered on 13 Jul 2018
9 answers
291 views
1) Is there a way to force input in uppercase?
2) What if I need to replace some key press with other key press? For example if the user presses "D" key I want to insert some predefined character no matter what is current active input language. Where is the best place in code to hook this functionality in? (override method, event handling) I want this replace function to execute before anything else (before autocomplete occurs)
Martin Ivanov
Telerik team
 answered on 09 Jul 2018
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?