Telerik
Home / Community / Forums / RadControls for ASP.NET: Combobox / Rad combox box onselectedindexchanged event not firing

Not answered Rad combox box onselectedindexchanged event not firing

Feed from this thread
  • Jayanthy avatar

    Posted on Jun 10, 2008 (permalink)

    I've a rad combo box. The selected index changed event is not firing. I'm using VS 2008 Here is the code

    <telerik:RadComboBox ID="uxQuestionType" Runat="server"
     DataSourceID="uxQuestionTypeODS" DataTextField="Name" DataValueField="TypeID"                                     RadComboBoxImagePosition="Right"
    Skin="WebBlue"                                              onselectedindexchanged="uxQuestionType_SelectedIndexChanged" autopostback="true"> <CollapseAnimation Duration="200" Type="OutQuint" />
    <Items>
    <telerik:RadComboBoxItem runat="server" Text="Root RadComboBoxItem 1" />
     </Items><ExpandAnimation Type="OutQuart" />
    </telerik:RadComboBox>

    protected void uxQuestionType_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {

            if (uxQuestionType.SelectedValue=="4")
                TextBox.Visible = true;
            else
                TextBox.Visible = false;
            if (uxQuestionType.SelectedValue =="5")
                TextArea.Visible = true;
            else
                TextArea.Visible = false;
        }
       

    Reply

  • Jayanthy avatar

    Posted on Jun 10, 2008 (permalink)

    My problem is fixed. The following thread helped me
    http://www.telerik.com/community/forums/thread/b311D-bcmdak.aspx

    Reply

  • Vikas avatar

    Posted on Jan 30 (permalink)

    Dude. set the autopostback property to radcombobox to true.

    Do anyone knows how to find selectedindexchange of any radcombobox if I pass combobox to a method????

     

    /// <summary>

     

     

    /// Sets the index of the combobox selected.

     

     

    /// </summary>

     

     

    /// <param name="combox">The combox.</param>

     

     

    /// <param name="selectedvalue">The selectedvalue.</param>

     

     

    private void SetComboboxSelectedIndex(RadComboBox combox, int index)

     

    {

        combox.SelectedIndex = 0;

        //Here, I want to fire selectedindexchange of combox.........

    }

    Please help..if anyone know this

    Reply

  • Telerik Admin admin's avatar

    Posted on Jan 30 (permalink)

    Hello Vikas,

    Why do you want to fire the SelectedIndexChanged server event from the code?

    You can place the code of the SelectedIndexChanged event handler in the SetComboboxSelectedIndex method.

    Greetings,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Vikas avatar

    Posted on Feb 1 (permalink)

    Hello Veselin,

    I have 10 comboboxes on the form and I have an requirement of setting 9 comboobxes index if 1st combobox index is changed.  This verification is again done from db.  Thats why i want to fire it on server side.  I can place the code of the SelectedIndexChanged event handler in the SetComboboxSelectedIndex method but i dont know which event is related to the combobox passed in the method SetComboboxSelectedIndex . 

    However i got around with this problem. This i can acheived as follows: 

    ///

    <summary>

     

     

    /// Sets the index of the combobox selected.

     

     

    /// </summary>

     

     

    /// <param name="combox">The combox.</param>

     

     

    /// <param name="selectedvalue">The selectedvalue.</param>

     

     

    private void SetComboboxSelectedIndex(RadComboBox combox, int index)

     

    {

     

        MethodInfo[] methods = combox.GetType().GetMethods();

     

     

        foreach (MethodInfo m in methods)

     

        {

     

            if (m.Name == "set_SelectedIndex")

     

            m.Invoke(combox,

    new object[] { index });

     

        }

    }



    If any one is having better option than this.. Please let me know...

    Thanks

    Vikas

    Reply

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2009 Telerik. All rights reserved.