Dynamically setting combo box value

3 posts, 0 answers
  1. Robert Butler
    Robert Butler avatar
    2 posts
    Member since:
    May 2010

    Posted 24 May 2010 Link to this post

    Hi All,

    I'm very new to Telerik controls but have a pretty good grasp of programming. I'm missing something here. I am taking over a project from another programmer and need to conditionally set a combo box value. It seems that the value is getting set because the behavior of a dependent control indicates that, but the text of the combo is not populated with the text of the item coresponding to the selectedvalue.

    Here is a snippet. I only want to populate and set if there is a pdiv value, otherwise I have the EnableLoadOnDemand behavior (I guess that's what it's called when you type in the combo and it looks the matching values up):


     

    if (pdiv.Length > 0)

     

    {

     

    //make sure it's populated

     

    rcbPDiv_ItemsRequested(

    null, new RadComboBoxItemsRequestedEventArgs());

     

     

    //set the value and text

     

    rcbPDiv.SelectedValue = pdiv;

    rcbPDiv.Text = pdivText;

     

    }

    Any and all help is greatly appreciated.
  2. Kevin
    Kevin avatar
    4 posts
    Member since:
    Sep 2008

    Posted 25 May 2010 Link to this post

    Hi Robert,

    Can you post more of the code as an attachment and let me know what value the combo box value is getting set as? I'm sure we can get this sorted out for you quickly.

    Regards,
    Kevin Hillinger
    Hillinger Studios
  3. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 28 May 2010 Link to this post

    Hi,

    In addition, having the configuration (full tag definition + any properties set through code) of the RadComboBox will also help us a lot with determining the problem.

    All the best,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top