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

DataTemplate and No Selection

1 Answer 54 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Philip Ashworth
Top achievements
Rank 1
Philip Ashworth asked on 26 Feb 2010, 05:04 PM
Hi,

I have a combobox that uses a DataTemplate like so

  <DataTemplate  x:Key="ComboBoxTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Path=ClientId}" ></TextBlock>
                <TextBlock Text=" - "></TextBlock>
                <TextBlock Text="{Binding Path=ClientName}"></TextBlock>
            </StackPanel>
     </DataTemplate>

But when my form loads there is no ClientId or ClientName selected and correctly shows nothing....but it does show the dash. i.e. " - ".

I want it to just show nothing so that the user has't to select from the combobox. I could insert "please select - " but I'd rather have a clean empty selection to start with.

This worked ok when I used a standard combobox.

Thanks Phil.

Code for the combobox creation:

 <Controls:RadComboBox Name="cb"  
telerik:TextSearch.TextPath="ClientName"
ItemTemplate="{StaticResource ComboBoxTemplate}"/>

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 01 Mar 2010, 09:45 AM
Hi Phil,

We will update our control to work the same way as the standard ComboBox with the upcoming official release Q1 2010, that is scheduled for the next week. This week's internal build will also contain the fix.

Kind regards,
Valeri Hristov
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
Philip Ashworth
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or