DataTemplate and No Selection

2 posts, 0 answers
  1. Philip Ashworth
    Philip Ashworth avatar
    41 posts
    Member since:
    Dec 2009

    Posted 26 Feb 2010 Link to this post

    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}"/>

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 01 Mar 2010 Link to this post

    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.
Back to Top