SelectedIndexChanged never Firing

6 posts, 0 answers
  1. Byzza
    Byzza avatar
    8 posts
    Member since:
    Jul 2007

    Posted 13 Apr 2009 Link to this post

    I'm having huge problems with the rad combo box.  I'm sure it worked once, but its not working now, and I can't seem to get it working.

    Basicly on post back selectedIndexChanged and TextChanged are never firing.  init and load and ItemCreated are always being fired on postback though.

    Page:
    %@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" 
        EnableEventValidation="false" CodeFile="Default.aspx.vb" Inherits="_Default" 
        Title="Notice Board" %> 
    .... 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <asp:Content ID="Content1" ContentPlaceHolderID="cph" runat="Server"
    ..... 
     
     <telerik:RadComboBox ID="rcbCategories" runat="server" Skin="WebBlue" AutoPostBack="true" 
                        AppendDataBoundItems="True" DataSourceID="sdsCategories" DataTextField="category" EnableLoadOnDemand="false"  
                        DataValueField="categoryID" > 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                        <Items> 
                            <telerik:RadComboBoxItem Text=" All News " Value="0" /> 
                        </Items> 
                    </telerik:RadComboBox> 
     
    ...... 
     
    </asp:Content> 


    Code:
     Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
     
            If Not Page.IsPostBack Then 
                logUser() 
            End If 
            If Not Page.IsPostBack Then 
                Me.lblPageTitle.Text = Page.Title 
            End If 
     
        End Sub 
     
     Protected Sub rcbCategories_Init(ByVal sender As ObjectByVal e As System.EventArgs) Handles rcbCategories.Init 
     End Sub 
     
        Protected Sub rcbCategories_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles rcbCategories.ItemCreated 
     
        End Sub 
     
        Protected Sub rcbCategories_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles rcbCategories.ItemDataBound 
     
        End Sub 
     
        Protected Sub rcbCategories_ItemsRequested(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles rcbCategories.ItemsRequested 
     
        End Sub 
     
        Protected Sub rcbCategories_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles rcbCategories.Load 
     
        End Sub 
     
        Protected Sub rcbCategories_SelectedIndexChanged(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles rcbCategories.SelectedIndexChanged 
            If lbArchive.Text = archiveText Then 
                'Me.lbArchive.Text = currentText 
                Me.sdsNews.SelectCommand = "uspSelectCurrentNews" 
                Me.sdsNews.DataBind() 
                Me.RadGrid1.DataBind() 
            Else 
                'Me.lbArchive.Text = archiveText 
                Me.sdsNews.SelectCommand = "uspSelectArchiveNews" 
                Me.sdsNews.DataBind() 
                Me.RadGrid1.DataBind() 
            End If 
        End Sub 


    Thanks in advance for any help you can offer.

    Regards

  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 16 Apr 2009 Link to this post

    Hello Byzza,

    Generally this should not be happening.

    Could you verify whether the data source is providing correct data? More specifically, do all Items have different values?

    All the best,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Byzza
    Byzza avatar
    8 posts
    Member since:
    Jul 2007

    Posted 19 Apr 2009 Link to this post

    I worked out the problem was to do with: EnableEventValidation="false"     being set up the top of the page.
    When I changed this to True, and fixed the other problems which caused me to set this to False in the first place the RadComboBox ended up working.  Though it is very stange that it wasn't working when it was set to false.

    Is there any reason this would be the case?
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 20 Apr 2009 Link to this post

    Hi Byzza,

    I tried creating a simple page with your RadComboBox definition and set EnableEventValidation to false and both SelectedIndexChanged and TextChanged events fired.

    I am not sure why they are not firing at your side. If you are interested in finding out why, please send us a runnable project/web site/page where the issue could be reproduced. We will inspect it and will try to provide a solution or a workaround.

    All the best,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Jairo
    Jairo avatar
    1 posts
    Member since:
    Oct 2012

    Posted 12 Oct 2012 Link to this post

    I have the same problem, but the problem is that for security reason i need to have EnableEventValidation =true , and in tha case im having an exception, how could i fix this issue?  thanks
  7. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 13 Oct 2012 Link to this post

    My dear, you forget to add event in you Radcombobox. if you donot add your event how it is fire. please add your event.

    OnClientSelectedIndexChanged="rcbCategories_SelectedIndexChanged"

    Regards
    Muhammad Waseem
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017