This question is locked. New answers and comments are not allowed.
Hi,
My name is Dejan and I'm new in Telerik/Silverlight environment, but not in programming.
We just start new project, Silverlight app development using Telerik Silverlight Controls and I have really annoying problem with combo box. (maybe it's not big deal but I'm stacked).
Platform is: VS2010 + Silverlight4 + Telerik RadControls for Silverlight Q3 2010 SP1 + MSSQL 2008
Scenario is next:
I have Entity with two fields: ID and Code. As you can see in code below I populate only "Code" field inside ComboBox List.
It is Entity with more then 5000 and growing items and I'm using VirtualizingStackPanel because.
I want to select "Code" as my choice inside ComboBox(IsEditable="True") but when I choose some "Code" value from the list only thing I'm getting in SelectionBox is "table name:ID" as SelectedItem, but if I change ComboBox(IsEditable="False") SelectionBox show me a "Code" I choose from the list.
In both cases (IsEditable = True or False), SelectedValue and SelectedItem have same value = "TableName : ID" but different result is shown in SelectionBox:
If "IsEditable=True" then SelectionBox = "TableName:ID
If "IsEditable=False" then SelectionBox = "Code"
And my ComboBox MUST be editable.
Why is that so and how to resolve this issue?
Best regards
Dejan
My code is:
My name is Dejan and I'm new in Telerik/Silverlight environment, but not in programming.
We just start new project, Silverlight app development using Telerik Silverlight Controls and I have really annoying problem with combo box. (maybe it's not big deal but I'm stacked).
Platform is: VS2010 + Silverlight4 + Telerik RadControls for Silverlight Q3 2010 SP1 + MSSQL 2008
Scenario is next:
I have Entity with two fields: ID and Code. As you can see in code below I populate only "Code" field inside ComboBox List.
It is Entity with more then 5000 and growing items and I'm using VirtualizingStackPanel because.
I want to select "Code" as my choice inside ComboBox(IsEditable="True") but when I choose some "Code" value from the list only thing I'm getting in SelectionBox is "table name:ID" as SelectedItem, but if I change ComboBox(IsEditable="False") SelectionBox show me a "Code" I choose from the list.
In both cases (IsEditable = True or False), SelectedValue and SelectedItem have same value = "TableName : ID" but different result is shown in SelectionBox:
If "IsEditable=True" then SelectionBox = "TableName:ID
If "IsEditable=False" then SelectionBox = "Code"
And my ComboBox MUST be editable.
Why is that so and how to resolve this issue?
Best regards
Dejan
My code is:
<Grid Height="57" HorizontalAlignment="Left" Margin="369,43,0,0" Name="gridSC" VerticalAlignment="Top" Width="420" DataContext="{Binding ElementName=supplier_codeDomainDataSource, Path=Data}">
<telerik:RadComboBox ItemsSource="{Binding ElementName=supplier_codeDomainDataSource,Path=Data}" HorizontalAlignment="Left" Margin="91,22,0,0" Name="cBoxSupplierCode" VerticalAlignment="Top" Width="250" IsEditable="True" SelectionChanged="cBoxSupplierCode_SelectionChanged" Text="{Binding Code}">
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Width="300"/>
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
<telerik:RadComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<telerik:RadComboBoxItem Content="{Binding Code}"/>
</StackPanel>
</DataTemplate>
</telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:View_Supplier_Code, CreateList=true}" Height="0" LoadedData="supplier_codeDomainDataSource_LoadedData" Name="supplier_codeDomainDataSource" QueryName="GetView_Supplier_CodeQuery" Width="0">
<riaControls:DomainDataSource.DomainContext>
<my:ViewSupplier_codeDomainContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
</Grid>
<telerik:RadComboBox ItemsSource="{Binding ElementName=supplier_codeDomainDataSource,Path=Data}" HorizontalAlignment="Left" Margin="91,22,0,0" Name="cBoxSupplierCode" VerticalAlignment="Top" Width="250" IsEditable="True" SelectionChanged="cBoxSupplierCode_SelectionChanged" Text="{Binding Code}">
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Width="300"/>
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
<telerik:RadComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<telerik:RadComboBoxItem Content="{Binding Code}"/>
</StackPanel>
</DataTemplate>
</telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:View_Supplier_Code, CreateList=true}" Height="0" LoadedData="supplier_codeDomainDataSource_LoadedData" Name="supplier_codeDomainDataSource" QueryName="GetView_Supplier_CodeQuery" Width="0">
<riaControls:DomainDataSource.DomainContext>
<my:ViewSupplier_codeDomainContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
</Grid>