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

OnClientSelectedIndexChanged Fired Without Index Change event

1 Answer 54 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Marvin
Top achievements
Rank 1
Marvin asked on 12 Sep 2008, 08:44 AM
I found a issue about RadComboBox control, OnClientSelectedIndexChanged event will be fired first time event there's no index change.

This is not reasonable and may cause some critical issue.
How can I make it not fired?

Thanks,
Marvin

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="DesktopModules_Test_Default4" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:radscriptmanager id="RadScriptManager1" runat="server"></telerik:radscriptmanager> 
        <telerik:radcombobox id="RadComboBox1" runat="server" OnClientSelectedIndexChanged="alert('a')"></telerik:radcombobox>      
    </div> 
    </form> 
</body> 
</html> 
 

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 12 Sep 2008, 08:55 AM
Hi Marvin,

I am not quite sure how to reproduce the problem. Can you elaborate a bit more please?

Also, I noticed that you are using: OnClientSelectedIndexChanged="alert('a')" to subscribe to the client event, which is not correct.

Please check this article on how to subscribe to the event:
http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientselectedindexchanged.html

All the best,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Marvin
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or