Telerik Forums
UI for Silverlight Forum
3 answers
100 views

Hi,

I got problem with SelectedItems binding - If I put breakpoint to the Setter of the SelectedComboFilterItems it will never be hit.

View:

<telerik:RadAutoCompleteBox x:Name="ComboFilterAutoCompleteBox" Grid.Column="1" Grid.Row="5"
  Margin="1" HorizontalAlignment="Stretch"   TextSearchMode="Contains"
  ScrollViewer.VerticalScrollBarVisibility="Auto"
  TextSearchPath="FormattedName" DisplayMemberPath="Name" SelectionMode="Multiple"
  ItemsSource="{Binding ComboFilterItems,Mode=TwoWay}"
  SelectedItems="{Binding SelectedComboFilterItems,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  IsEnabled="{Binding ComboFilterEnabled}"
  FilteringBehavior="{StaticResource CustomFilteringBehavior}"
   <telerik:RadAutoCompleteBox.DropDownItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedName}"/>
                </DataTemplate>
    </telerik:RadAutoCompleteBox.DropDownItemTemplate>
</telerik:RadAutoCompleteBox>

 

Here is ViewModel:

 

public ObservableCollection<DocumentType> mSelectedComboFilterItems = new ObservableCollection<DocumentType>();
public ObservableCollection<DocumentType> SelectedComboFilterItems
{
    get
    {
        return mSelectedComboFilterItems;
    }
    set
    {
        mSelectedComboFilterItems = value;
    }
}
public ObservableCollection<DocumentType> ComboFilterItems { get; set; } = new ObservableCollection<DocumentType>();

 

Rest of the binding is working fine.

If I select few items the SelectedComboFilterItems will hold those values. Just for some reason the setter is never called.

Cheers

Mike

Dilyan Traykov
Telerik team
 answered on 08 Sep 2020
6 answers
286 views

Hi,

Currently the AutoCompleteBox will display items only when you type at least one letter.

Is it possible to display all items when AutoCompleteBox gets a focus? Basically if I click on the AutoCompleteBox I would like to see the list of all available items, then if you start typing it will filter as standard.

 

Cheers

Mike

Michal
Top achievements
Rank 1
 answered on 21 Jan 2020
3 answers
80 views

Hello,

I have drop down box defined as:

<tk:RadAutoCompleteBox Name="Members"
                       AutoCompleteMode="Suggest"
                       MaxDropDownHeight="500"
                       MinDropDownWidth="400"
                       SelectionMode="Single"
                       TextSearchMode="Contains"
                       TextSearchPath="NoLastNameFirstName"
                       Width="300">
  <tk:RadAutoCompleteBox.DropDownItemTemplate>
    <DataTemplate>
      <StackPanel Orientation="Horizontal">
        <TextBlock Text="{Binding Section.Code}"
                   Width="50" />
        <TextBlock Text="{Binding NoText}"
                   Width="70" />
        <TextBlock Text="{Binding LastNameFirstName}" />
      </StackPanel>
    </DataTemplate>
  </tk:RadAutoCompleteBox.DropDownItemTemplate>
 
  <tk:RadAutoCompleteBox.FilteringBehavior>
    <tk:AsyncFilteringBehavior />
  </tk:RadAutoCompleteBox.FilteringBehavior>
 
</tk:RadAutoCompleteBox>

 

As you can see, the Width is set to 300 and, as the drop down is not wide enough to display all the information, the MinDropDownWidth is set to 400.

Unfortunately, the result is not what's expected: instead of making the drop down wider, it still has a width of 300, but is just moved to the right by 100!

Dilyan Traykov
Telerik team
 answered on 05 Sep 2018
1 answer
129 views

Hi

The drop down always opens when you click the drop down button.
Is it possible to have standard drop down behavior that when you click and the drop down is already opened it would close and not just open again?

Nasko
Telerik team
 answered on 07 Apr 2017
3 answers
249 views

It is possible to set the width of the drop down menu to the width of the widest item in the list?

Currently when you scroll the drop down menu resizes automatically if DropDownWidth is set to Auto.

Nasko
Telerik team
 answered on 30 Nov 2016
3 answers
123 views

SelectionMode = Multiple, I am populating ItemsSource with with a list, then I programmatically populate SelectedItems with item from that list, but SearchText remains blank,  In Single Selection mode when I programmatically set SelectedItem the value at TextSearchPath does populateSearchText.

In Multiple selection mode when multiple objects are selected by the user SearchText does not display simple text, but rather a series of boxes with a close button,and at that time SearchText is blank.

How can I have the SearchTextfield display the selected items the same programmatically as when the user manually selects the items?

Kenneth
Top achievements
Rank 2
Iron
 answered on 22 Apr 2016
4 answers
70 views

I have an radautocompletebox with a list of forms, I want to be able to search on the form number or name, but for space purposes only display the form number once a form is selected.

I have a list of form objects with these properties:

Value = "001"
Display = "Identification Card"
ValueDisplay  = "001-Identification Card"

The autocomplete box:

TextSearchPath = "Value"
DisplayPath = "ValueDisplay"

This shows the ValueDisplay in the dropdown and selects Value when selected but it does not allow for searching on the form name (Display).

Is there a way to allow searching on ValueDisplay but only show Value when selected?

Kenneth
Top achievements
Rank 2
Iron
 answered on 18 Apr 2016
1 answer
36 views

Hi,

I have two controls , first RadAutoCompleteBox , sec TextBox. As a Datasource of RadAutoCompleteBox I've a DataTable ( with 4 columns) , when I start insert text requesting is starting and I have to select item on dropdown , and when I select item I want to get third column of selected (from datable) item and put into second TextBox . I is possible ?

Yana
Telerik team
 answered on 12 Feb 2016
2 answers
338 views
How to Clear a SelectedItem of  AutoCompleteBox  using C#  i'm using this it's working for all controls except autocompletebox

 void clear()
        {
            //This loop takes all controls from the form1 - make sure your form name as newInvoice otherwise change it as per your form name

            foreach (var controls in newReceiveItemView.GeneralGridLayout.Children)
            {
                //Clear all textbox values
                if (controls is TextBox)
                    ((TextBox)controls).Text = "";

                //clear all check boxes
                if (controls is CheckBox)
                    ((CheckBox)controls).IsChecked = false;

                //Clear all RadComboBox 
                if (controls is RadComboBox)
                    ((RadComboBox)controls).SelectedItem = null;

                //Clear all RadAutoCompleteBox 
                if (controls is RadAutoCompleteBox)
                    ((RadAutoCompleteBox)controls).SelectedItem = null;// this is not working selectedItem is not Clearing
                
                //((RadComboBox)controls).SelectedIndex = -1;

                //Clear all radio buttons
                if (controls is RadMaskedTextBox)
                    ((RadMaskedTextBox)controls).Value = "";
}
}
Gustavo Ruzzante
Top achievements
Rank 1
 answered on 03 Feb 2016
9 answers
229 views
Hi,

When the RadAutoCompleteBox goes from SelectedItem non-null to SelectedItem null (e.g. from binding), the control will visually display with an empty box, however, the SearchText will still be the previous value (i.e. that of the last SelectedItem). (Ideally I think it should null/empty the SearchText property)

Please see the linked project for an example (instructions to produce issue are in the project's Notes file)

https://docs.google.com/uc?id=0B5oaFsWDMeYmRGpRTUJOTzZPb2s&export=download



Version:
2014.2.729.1050 (This is the version in the linked project)

Also tested on internal build with same result:
2014.3.1319.1050
Geri
Telerik team
 answered on 20 Mar 2015
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?