Radcombo box selected index?

4 posts, 0 answers
  1. sivakanth
    sivakanth avatar
    50 posts
    Member since:
    Dec 2010

    Posted 15 Mar 2011 Link to this post

    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
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 16 Mar 2011 Link to this post

    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!
  3. UI for WPF is Visual Studio 2017 Ready
  4. sivakanth
    sivakanth avatar
    50 posts
    Member since:
    Dec 2010

    Posted 16 Mar 2011 Link to this post

    Hello Telerik Team,
                                      If i add mode=Twoway also after combobox display empty?
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 17 Mar 2011 Link to this post

    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
Back to Top