Radcombobox SelectedIndexChanged Event not firing

7 posts, 0 answers
  1. Mohammed Rafiq
    Mohammed Rafiq avatar
    1 posts
    Member since:
    Apr 2010

    Posted 21 Apr 2010 Link to this post

    Hi,

    I have a combobox added in a usercontrol. I am loading the user control dynamically in the page. I have registered the event selectedIndexChanged in the user control, but the event is not firing.

    Below is the control added in user control. 
    <telerik:RadComboBox ID="rcbPlain" runat="server" CausesValidation="false" MaxLength="30" AutoPostBack="true" OnSelectedIndexChanged="rcbPlaint_SelectedIndexChaned">  
                    </telerik:RadComboBox> 

    I am then loading the usercontrol dynamically in the page in the page_load event.
    But the event is not firing.

    Thanks in Advance,
    Afzal
  2. Claus Pedersen
    Claus Pedersen avatar
    7 posts
    Member since:
    Mar 2010

    Posted 21 Apr 2010 Link to this post

    I experience the same problem.

    I am trying to set the values of a series of cascaded Comboboxes from a saved state from the db.
    Because the Comboboxes are cascaded, it is very important that the SelectedIndexChanged funtion is called between setting index in each combo.

    The page is called with a saveset id and if not postback, then I load the saveset from the database and iterate through it.
    It contains a series of ComboBoxIds/values in the correct order.
    I set the new index like this:
    curCombo.SelectedIndex = curCombo.FindItemIndexByValue(controlIdValue[1]); 
    To make sure that the index changes.
    The first Combo index does change, because it's content is loaded before the above is called, but the next combo fails on "FindItemIndexByValue" because it is empty because the SelectedIndexChanged funtion of the previous combo, which is responsible of populating the next combo, isn't called.

    Running Q1 SP1 .Net 4.0.

    /Claus

  3. Arunkumar Nagendra
    Arunkumar Nagendra avatar
    1 posts
    Member since:
    Apr 2010

    Posted 21 Apr 2010 Link to this post

    Does anybody know how to resolve this. I am facing the same issue. This is making me to pull my hairs off :-(
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 23 Apr 2010 Link to this post

    Hi guys,

    I was not able to reproduce the problem with the dynamically loaded user control with combobox.
    Find attached a sample project.

    Sincerely yours,
    Veskoni
    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.
  5. Bill Fogg
    Bill Fogg avatar
    2 posts
    Member since:
    Aug 2009

    Posted 07 May 2010 Link to this post

    I am having the same problem. Has anyone found a fix for this.

    The difference between the last example and what I (and I think the others) are doing is using the load on demand feature.

     

     

     

     
                                                <telerik:RadComboBox ID="LicCertCb" runat="server" Height="200px" Width="200px" 
                                                    DropDownWidth="530px" EmptyMessage="Choose one" HighlightTemplatedItems="true" 
                                                    EnableLoadOnDemand="true" OnItemsRequested="LicCertCb_ItemsRequested" OnSelectedIndexChanged="LicCertCb_SelectedIndexChanged" AutoPostBack="true" > 
                                                    <HeaderTemplate> 
                                                        <table style="width: 500px" cellspacing="0" cellpadding="0">  
                                                            <tr> 
                                                                <td style="width: 50px;">  
                                                                    Type  
                                                                </td> 
                                                                <td style="width: 100px;">  
                                                                    Number  
                                                                </td> 
                                                                <td style="width: 50px;">  
                                                                    State  
                                                                </td> 
                                                                <td style="width: 300px;">  
                                                                    Agency  
                                                                </td> 
                                                            </tr> 
                                                        </table> 
                                                    </HeaderTemplate> 
                                                    <ItemTemplate> 
                                                        <table style="width: 500px" cellspacing="0" cellpadding="0">  
                                                            <tr valign="top">  
                                                                <td style="width: 50px;">  
                                                                    <%# DataBinder.Eval(Container, "Attributes['Type']")%> 
                                                                </td> 
                                                                <td style="width: 100px;">  
                                                                    <%# DataBinder.Eval(Container, "Text")%> 
                                                                </td> 
                                                                <td style="width: 50px;">  
                                                                    <%# DataBinder.Eval(Container, "Attributes['State']")%> 
                                                                </td> 
                                                                <td style="width: 300px;">  
                                                                    <%# DataBinder.Eval(Container, "Attributes['Agency']")%> 
                                                                </td> 
                                                            </tr> 
                                                        </table> 
                                                    </ItemTemplate> 
                                                </telerik:RadComboBox> 
     

    The LicCertCb_ItemsRequested method is being called and populating the combo box but when I select one of the values it doesn't call the LicCertCb_SelectedIndexChanged method.

  6. Bill Fogg
    Bill Fogg avatar
    2 posts
    Member since:
    Aug 2009

    Posted 07 May 2010 Link to this post

    Sorry, my fault.

    The issue was that I had a validator on another element on the form and it was preventing the post-back from happening.

    I modified it to use a validation group and everything is working now.
  7. Alec
    Alec avatar
    1 posts
    Member since:
    Mar 2018

    Posted 28 Mar 2018 in reply to Bill Fogg Link to this post

    Thanks for posting this. I just ran into the same issue.
Back to Top