SelectedItem Programmatically

2 posts, 0 answers
  1. cayo fontana
    cayo fontana avatar
    9 posts
    Member since:
    Mar 2010

    Posted 08 Sep 2011 Link to this post

    Hi Telerik,

    I'm using  a RadCombobox in my application and i like to know how i can select item in code behind?
    My RadCombobox is bounded thats so:
    foreach (ClienteBE _cliente in this.lstCliente)
                    tam = _cliente.Nome.Length > tam ?
                        _cliente.Nome.Length :
                    this.cmbCliente.DisplayMemberPath = "Nome";

    this.lstCliente is a list of objects.

  2. Yana
    Yana avatar
    4548 posts

    Posted 12 Sep 2011 Link to this post

    Hi Cayo,

    You can set either SelectedItem or SelectedIndex property of the combobox.

    All the best,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
Back to Top