RADCombobox is used in user control.
<telerik:RadComboBox ID="ddlCustomerName"
runat="server"
Width ="300px"
AllowCustomText="false"
HighlightTemplatedItems="true"
OnClientSelectedIndexChanging="PopulateContract"
EnableLoadOnDemand="true"
OnItemsRequested="ddlCustomerName_ItemsRequested"
MarkFirstMatch="true"
AutoPostback="true">
</telerik:RadComboBox>
This user control is registered in an aspx page.
<%
@ Register TagPrefix="uc"
TagName="TestFooter"
Src="~/UserControl/ParameterSetFooterGrid.ascx" %>
The Radcombobox in the user control is a mandatory field. The user should be alerted with message "Please enter xxx to proceed further" but this is not getting fired.
function
fn_Validation(Customer)
{
if(document.getElementById(Customer).selectedIndex==0)
{
alert(
'Please select a Customer Name to proceed further')
document.getElementById(Customer).focus();
return false;
}
}
This function is called on button click as
btnSubmit.Attributes.Add(
"onClick", "return fn_Validation('" & TH1.Customer.ClientID & "' );")
This event is not getting fired.