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

Dynamically setting combo box value

2 Answers 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Butler
Top achievements
Rank 1
Robert Butler asked on 24 May 2010, 05:48 PM
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 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 25 May 2010, 06:02 PM
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
0
T. Tsonev
Telerik team
answered on 28 May 2010, 07:15 AM
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.
Tags
General Discussions
Asked by
Robert Butler
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or