Hi,
I am trying to reset the value set in a combobox of a ComboBox used in a UserControl.
UserControl looks like that :
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl.ascx.cs" Inherits="UserControls.UserControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadComboBox ID="comboBox" runat="server"
EnableVirtualScrolling="false" EnableTextSelection="true" MaxHeight="250px"
AllowCustomText="False" MarkFirstMatch="false" ShowMoreResultsBox="true"
Filter="Contains" EnableLoadOnDemand="True" Sort="Ascending" Width="280px"
OnItemsRequested="comboBox_ItemsRequested" AutoPostBack="True"
OnSelectedIndexChanged="comboBox_SelectedIndexChanged" CausesValidation="false"
ZIndex="1000" ontextchanged="comboBox_TextChanged"></telerik:RadComboBox>
</span>
When I try to call the ClearSelection of the comboBox in default.aspx like that :
<html>
<body onload="Load()" >
<uc1:UserControl ID="cboComboBox" runat="server" Width="95%" MaxHeight="175px" />
</body>
</html>
<script type="text/javascript">
function Load() {
var cboComboBox= document.getElementById('<%=cboComboBox.FindControl("comboBox").ClientID%>');
cboComboBox.clearSelection();
}
</script>
I keep getting the error "Method undefined"
Any idea why ?
Thanks,
Guillaume
I am trying to reset the value set in a combobox of a ComboBox used in a UserControl.
UserControl looks like that :
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl.ascx.cs" Inherits="UserControls.UserControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadComboBox ID="comboBox" runat="server"
EnableVirtualScrolling="false" EnableTextSelection="true" MaxHeight="250px"
AllowCustomText="False" MarkFirstMatch="false" ShowMoreResultsBox="true"
Filter="Contains" EnableLoadOnDemand="True" Sort="Ascending" Width="280px"
OnItemsRequested="comboBox_ItemsRequested" AutoPostBack="True"
OnSelectedIndexChanged="comboBox_SelectedIndexChanged" CausesValidation="false"
ZIndex="1000" ontextchanged="comboBox_TextChanged"></telerik:RadComboBox>
</span>
When I try to call the ClearSelection of the comboBox in default.aspx like that :
<html>
<body onload="Load()" >
<uc1:UserControl ID="cboComboBox" runat="server" Width="95%" MaxHeight="175px" />
</body>
</html>
<script type="text/javascript">
function Load() {
var cboComboBox= document.getElementById('<%=cboComboBox.FindControl("comboBox").ClientID%>');
cboComboBox.clearSelection();
}
</script>
I keep getting the error "Method undefined"
Any idea why ?
Thanks,
Guillaume