Unable to select Item on Postback

2 posts, 0 answers
  1. Mihir Pathak
    Mihir Pathak avatar
    14 posts
    Member since:
    Aug 2009

    Posted 04 Jun 2010 Link to this post

    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.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Jun 2010 Link to this post

    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.
Back to Top