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

SelectedIndexChanged never Firing

5 Answers 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Byzza
Top achievements
Rank 2
Byzza asked on 14 Apr 2009, 12:04 AM
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

5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 16 Apr 2009, 04:58 PM
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.
0
Byzza
Top achievements
Rank 2
answered on 19 Apr 2009, 11:01 PM
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?
0
Simon
Telerik team
answered on 20 Apr 2009, 02:01 PM
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.
0
Jairo
Top achievements
Rank 1
answered on 12 Oct 2012, 08:10 PM
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
0
Waseem
Top achievements
Rank 1
answered on 14 Oct 2012, 02:50 AM
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
Tags
ComboBox
Asked by
Byzza
Top achievements
Rank 2
Answers by
Simon
Telerik team
Byzza
Top achievements
Rank 2
Jairo
Top achievements
Rank 1
Waseem
Top achievements
Rank 1
Share this question
or