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

Unable to select Item on Postback

1 Answer 68 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mihir Pathak
Top achievements
Rank 1
Mihir Pathak asked on 04 Jun 2010, 08:14 PM
Hi,

Let say I have few items in my radcombobox
Item1
Item2 ---> Selected
Item3

New Input value: Item 3
On Submit -- Must select Item 3.. 
But Item2 remain selected

foreach

 

(RadComboBoxItem item in rdCboStaff.Items)

 

{

 

    if (newvalue == item.Value)

 

        item.Selected =

true;

 

}

What is missing here?

Thanks
Mihir.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Jun 2010, 01:34 PM
Hello,

Try the following approach and see whether it helps.

javascript:
 
<script type="text/javascript">  
    function OnClientBlur(sender, args) {  
        sender.findItemByText(sender.get_text()).set_selected(true);  
    }  
</script> 
Attach OnClientBlur event to RadComboBox.

Regards,
Princy.
Tags
ComboBox
Asked by
Mihir Pathak
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or