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

Radcombo box selected index?

3 Answers 250 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
sivakanth
Top achievements
Rank 1
sivakanth asked on 15 Mar 2011, 01:24 PM
Hello Telerik Team,
                             I have one clarification in my latest WPF project.Here I am  having one radcombo box.Its contains 3 values.
<telerik:RadComboBox HorizontalAlignment="Left" SelectedIndex="{Binding xx}"  Margin="114,207,0,0" Name="radComboBox2" VerticalAlignment="Top" Width="205">
            <telerik:RadComboBoxItem Content="Item 1" />
            <telerik:RadComboBoxItem Content="Item 2" />
            <telerik:RadComboBoxItem Content="Item 3" />
        </telerik:RadComboBox>
When window loading time i want to display item3 in radcombobox.After window loading client can change the value and storing into database.
So i am binding into selectedindex in XAML.
codebehind sample
public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.radComboBox2.SelectedIndex = 2;
        }
    }
 But it display empty Combobox?
why?
pls give me any suggestions

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 16 Mar 2011, 01:53 PM
Hi Sivakanth,

Your code looks fine and there shouldn't be any problems. Just set the Mode of the binding to TwoWay and that should be enough to fix the issue.

Please let us know if that helped.

Greetings,
Konstantina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
sivakanth
Top achievements
Rank 1
answered on 16 Mar 2011, 03:22 PM
Hello Telerik Team,
                                  If i add mode=Twoway also after combobox display empty?
0
Konstantina
Telerik team
answered on 17 Mar 2011, 09:18 AM
Hi Sivakanth,

In that case could you please send us your project in which this issue can be reproduced. Also, could you please share with us which version of the controls you are using? Could you please try with the latest assemblies and let us know if the issue persists.

Best wishes,
Konstantina
the Telerik team
Tags
ComboBox
Asked by
sivakanth
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
sivakanth
Top achievements
Rank 1
Share this question
or