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

Text property does not update

0 Answers 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Quin
Top achievements
Rank 1
Quin asked on 26 Jul 2011, 11:28 PM
I have a multiselect control that I created using the RadComboBox.  I want the Text property to be updated to display the CheckedItems.  The ToolTip works fine.  It is updated whenever CheckedItems source changes.  However, I cannot get the Text property to update. The dependency property, "PreviewText", is a comma seperated string of the selected items.  The binding to the text property works the first time that the source is set, but does not update when the source changes.

<Style TargetType="ccb:CheckableComboBox">
       <Setter Property="Template">
           <Setter.Value>
               <ControlTemplate TargetType="ccb:CheckableComboBox">
                   <Grid x:Name="LayoutRoot">
                       <telerik:RadComboBox x:Name="ItemsDisplay"
                                            VerticalAlignment="Top"                                            
                                            Text="{TemplateBinding ShortPreviewText}"
                                            ToolTipService.ToolTip="{TemplateBinding PreviewText}"
                                            ToolTipService.Placement="Top"
                                            CanAutocompleteSelectItems="True"
                                            IsTextSearchEnabled="True"
                                            IsEditable="False">
 
 
                       </telerik:RadComboBox>
                   </Grid>
               </ControlTemplate>
           </Setter.Value>
       </Setter>
   </Style>

Also, I tried this:
<telerik:RadComboBox x:Name="ItemsDisplay"
   VerticalAlignment="Top"                                            
   Text="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay, Path=(ToolTipService.ToolTip)}"
   ToolTipService.ToolTip="{TemplateBinding PreviewText}"
   ToolTipService.Placement="Top"
   CanAutocompleteSelectItems="True"
   IsTextSearchEnabled="True"
   IsEditable="False"> 
                       </telerik:RadComboBox>

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Quin
Top achievements
Rank 1
Share this question
or