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

Page_Load Combobox

1 Answer 69 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 01 Aug 2008, 03:42 AM
In Page_Load I have ComboBox is has a SQLdatasource to load it's items, get the itemID and set the .SelectedValue to what's in the Database.
I would like to get the RadCombobox1.Text and put it into a label, as in label.text = RadComboBox1.Text;

The ComboBox loads fine, sets the correct value, but I can't seem to get the .Text to show up in the label.

Any pointers in the right direction would be much appreciated.

Thanks,

Brett

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 01 Aug 2008, 06:32 AM
Hi Brett,

Could you give us more information when (in what event of RadComboBox) you update the text of the label?

This should works in any event except in the ItemsRequested event. If you do this in SelectedIndexChanged event check if AutoPostBack is set to true.

Also if you use RadAjaxManager you have to configure it so the combo to update the label.

If you use RadAjaxPanel both RadComboBox and the label have to reside inside the panel.

Hope this helps.

Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Brett
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or