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

Combo box selected item reloads a null value

1 Answer 110 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Cameron Adams
Top achievements
Rank 1
Cameron Adams asked on 17 Sep 2009, 10:19 AM
I'm having a really hard time working this out so I'm hoping someone can slap me, tell me I'm stupid and point me in the right direction. I've got a RadComboBox loading into a Column a Telerik GridView. The item source for the combo box is loading from a collection which is a static resource. What I'm seeing is that the control loads correctly, including loading the correct selected item, then it refreshes and the selected item becomes null. I'm not up-to-speed with the silverlight control lifecycle so I've got no idea what's going on.

<telerikGridView:GridViewDataColumn IsReadOnly="True" Width="Auto" Header="Acquisition Method" DataMemberBinding="{Binding AcquisitionMethodID}"
                    <telerikGridView:GridViewDataColumn.CellTemplate> 
                        <DataTemplate> 
                                <telerikInput:RadComboBox x:Name="AcqMethod"  
                                                          Loaded="RadComboBox_Loaded"  
                                                          IsReadOnly="True" 
                                                          HorizontalAlignment="Left"  
                                                          VerticalAlignment="Top"  
                                                          Width="167"  
                                                          ItemsSource="{Binding Mode=OneWay
                                                                            Source={StaticResource CodeTables}, 
                                                                            Path=AcquisitionMethod}" 
                                                          SelectedValuePath="AcquisitionMethodID"  
                                                          SelectedValue="{Binding Mode=TwoWay
                                                                            Path=AcquisitionMethodID}"  
                                                          DisplayMemberPath="AcquisitionMethod"/> 
                            </DataTemplate> 
                        </telerikGridView:GridViewDataColumn.CellTemplate> 
                    </telerikGridView:GridViewDataColumn> 


Any help would be very welcome.
Thanks
Cam

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 23 Sep 2009, 09:37 AM
Hi Cam,

I created a simple application that demonstrates my understanding of your problem, please, find it attached. However, it seems that it works properly with the latest internal build (that is not released yet). Am I doing something wrong? You could also try to upgrade the assemblies in your application with the latest internal build available and see if it works, because the problem could be caused by a bug that has been already fixed. I also saw that you have a handler for the Loaded event in RadComboBox - it could contain code that causes the problem, if the upgrade and my application did not help, I would like to see what's in this handler.

Greetings,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Cameron Adams
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or