Hi,
I'm new to Telerik controls and I'm quite enjoying it!
Right now, I'm facing a problem which I really hope someone could help me solve :)
I'm trying to use javascript to stop the postback when selecting an item in a RadComboBox whose AutoPostBack is true..., while still allowing the selected item in the combo box to change...
So from what I understood in the documentation, I can stop it using "return false" in ClientSelectedIndexChanging, but that is not working...
I wrote a test page to check whether the problem was specific to my application, but here also it does not work...
What am I doing wrong?
Thanking you before hand,
Cheers,
Â¥@$#.
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
|
|
|
<%@ 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>Test Page</title> |
|
<script type="text/javascript"> |
|
function check(item) |
|
{ |
|
alert('test'); |
|
return false; |
|
} |
|
</script> |
|
</head> |
|
<body> |
|
<form id="form1" runat="server"> |
|
<div> |
|
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
|
</asp:ScriptManager> |
|
<telerik:RadComboBox ID="RadComboBox1" Runat="server" |
|
onclientselectedindexchanging="check" |
|
onselectedindexchanged="RadComboBox1_SelectedIndexChanged1" |
|
AutoPostBack="True" > |
|
<Items> |
|
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="1" /> |
|
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="2" /> |
|
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="3" /> |
|
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="4" /> |
|
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="5" /> |
|
</Items> |
|
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
|
</telerik:RadComboBox> |
|
<br /> |
|
<br /> |
|
<br /> |
|
|
|
</div> |
|
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
|
</form> |
|
</body> |
|
</html> |
|
|