This is a migrated thread and some comments may be shown as answers.

Searching and Displaying an IsEditable combobox

1 Answer 58 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 08 May 2011, 11:57 PM
I want to search one value of my item in my itemtemplate, but I display a different one when selected.  I'm not sure this is possible.

It would be like the demo 'Using ItemTemplate in Editable ComboBox', but you could search phone or zip along with the Name.  Then when selected, only the name would show up in the combo box.

The SelectedValuePath doesn't seem to work when I have the telerik:TextSearch.TextPath set.

<telerik:RadComboBox   Name="rcbBillingTkpr" 
      DropDownClosed="rcbBillingTkpr_DropDownClosed"
         IsReadOnly ="False"   TextSearchMode="Contains"
        telerik:TextSearch.TextPath="Name" SelectedValuePath="Tkpr"
        ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Clear"
        Width="80" 
        IsEditable="True" IsFilteringEnabled="True">
    <telerik:RadComboBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <local:HighlightingTextBlock   Background="Beige" HighlightBrush="Blue" Margin="0 0 5 0"
    HighlightFontWeight="Bold" HighlightText="{Binding Text, ElementName=rcbBillingTkpr}" 
    Text="{Binding Name}"  />
                <local:HighlightingTextBlock FontWeight="Bold" Background="Beige" HighlightBrush="Blue" 
    HighlightFontWeight="Bold"  HighlightText="{Binding Text, ElementName=rcbBillingTkpr}" 
    Text="{Binding Tkpr}"  />
            </StackPanel>
        </DataTemplate>
    </telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 11 May 2011, 06:09 PM
Hi Dan,

 
I would suggest using custom ItemTemplate and the attached property TextSearch.TextPath that helps you to specify which value you want to use for AutoComplete and AutoSelect. Please, refer to our online documentation where you can find additional information about your scenario - http://www.telerik.com/help/silverlight/radcombobox-features-autocomplete.html#Using_Custom_ItemTemplate & http://www.telerik.com/help/silverlight/radcombobox-features-selection.html

I hope this helps.

Greetings,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
danparker276
Top achievements
Rank 2
Answers by
George
Telerik team
Share this question
or