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

RadCombobox inside the telerik gridview not displaying the SelectedValue

1 Answer 109 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mahesh
Top achievements
Rank 1
Mahesh asked on 02 Dec 2019, 01:59 PM

Hi,
I've a RadComboBox inside the RadGridView. When loading the tab very first time data inside the combobox is not displaying.

We have data in selectedvalue and in itemsource collection, but it is not displaying. Combobox is in editable mode.
<telerik:RadComboBox x:Name="ComboBox" Tag="{Binding SeqNo,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource TextSearchStyle}" 
           ItemsSource="{Binding DataContext.List, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}"
                SelectedValue="{Binding Code, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" SelectedValuePath="Code"  IsEditable="True" ItemTemplate="{StaticResource ComboBoxItem}" ItemContainerStyle="{StaticResource ComboBoxItemStyle}"
                CanKeyboardNavigationSelectItems="True" TextSearchMode="Contains" IsFilteringEnabled="True"  OpenDropDownOnFocus="False" GotFocus="ComboBox_GotFocus" LostFocus="ComboBox_LostFocus" DropDownClosed="ComboBox_DropDownClosed"  GotKeyboardFocus="ComboBox_GotKeyboardFocus"
                IsTextSearchEnabled="True" KeyDown="ComboBox_KeyDown" PreviewKeyDown="ComboBox_KeyUp" CanAutocompleteSelectItems="False" TabIndex="7" >
                                                    <telerik:RadComboBox.ToolTip>
                                                        <StackPanel Height="Auto" Width="Auto" MaxWidth="300" Background="#F2F2F2">
                                                            <TextBlock Text="{Binding ShortDescription}" Style="{StaticResource ToolTipCodesDescriptionTextBlock}"/>
                                                        </StackPanel>
                                                    </telerik:RadComboBox.ToolTip>
                                                    <i:Interaction.Triggers>
                                                        <i:EventTrigger EventName="GotFocus">
                                                            <i:InvokeCommandAction Command="{Binding DataContext.LoadPopUpCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}" CommandParameter="{Binding DataContext, ElementName=ComboBox}" />
                                                        </i:EventTrigger>
                                                        <i:EventTrigger EventName="DropDownClosed">
                                                            <i:InvokeCommandAction Command="{Binding DataContext.CPTSelectionChanged, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}" 
                CommandParameter="{Binding DataContext, ElementName=CPTComboBox}"/>
                                                        </i:EventTrigger>
                                                        <i:EventTrigger EventName="LostFocus">
                                                            <i:InvokeCommandAction Command="{Binding DataContext.ComboLostFocusCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}" CommandParameter="{Binding DataContext, ElementName=ComboBox}" />
                                                        </i:EventTrigger>
                                                    </i:Interaction.Triggers>
                                                </telerik:RadComboBox>
Regards,
Mahesh

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 05 Dec 2019, 09:43 AM

Hi,

This post seems to be duplicate to your other one posted in this forum thread. I already post a reply in the other forum thread. In order to avoid duplication, let's continue there.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ComboBox
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or