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

Databindings Incorrect:Redux

3 Answers 74 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 02 Aug 2009, 09:26 PM
I'm having this problem again LOL!

I'm using the RadComboBox.  Should be the latest legal version.  I'm populating the dropdown with a WCF Service.  The dropdown list is filling correctly.  When I click on the item I get it's type in the text portion of the box.

Here's the top of the XAML:
    x:Class="AMRSilverlight.MedDlg" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"   
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
    mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="300" 
    Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
 

Here's my Control XAML:
        <telerikInput:RadComboBox x:Name="ProblemList" ItemsSource="{Binding ProblemList}" telerik:TextSearch.TextPath="{Binding ICDText}" Grid.Row="8" Grid.Column="1" IsEditable="True" Height="20" Margin="0,0,10,0"
            <telerikInput:RadComboBox.ItemTemplate> 
                <DataTemplate> 
                    <StackPanel Orientation="Horizontal"
                        <TextBlock Text="{Binding ICDText}"/> 
                    </StackPanel> 
                </DataTemplate> 
            </telerikInput:RadComboBox.ItemTemplate> 
        </telerikInput:RadComboBox> 
 

Here's my class:
        [DataContract] 
        public class ProblemList 
        { 
            [DataMember(Name="ICDText")] 
            public string ICDText { get; set; } 
        } 
 

What did I do wrong this time?


3 Answers, 1 is accepted

Sort by
0
Darren
Top achievements
Rank 1
answered on 04 Aug 2009, 02:01 PM
XP service pack 3
Visual Studio 2008 sp1
.Net Frameworks 3.5 sp1
SQL Server 2005 Developer Edition 9.00.4035.00

What else do I need to add to get a reply to this post?

0
Accepted
hwsoderlund
Top achievements
Rank 1
answered on 04 Aug 2009, 02:57 PM
Just change:
telerik:TextSearch.TextPath="{Binding ICDText}"

to:
telerik:TextSearch.TextPath="ICDText"
0
Darren
Top achievements
Rank 1
answered on 04 Aug 2009, 08:05 PM
Doh!  Thanks Hwsoderland!
Tags
ComboBox
Asked by
Darren
Top achievements
Rank 1
Answers by
Darren
Top achievements
Rank 1
hwsoderlund
Top achievements
Rank 1
Share this question
or