I am using the custom Validator as Required Field validator fails for the Ajax Combobox, but I am not able to work it out for the Combobox, howeverr when I pass the Id of another Textbox in the custom Validator control to validate option, it works fine.
Below is my code:Updated
<ajax:ComboBox ID="Cmbx" runat="server" Width="100px" CssClass="AquaStyle textfont"
AutoPostBack="true" DropDownStyle="DropDown" AutoCompleteMode="SuggestAppend"
CaseSensitive="false" ItemInsertLocation="Append"
ValidationGroup="Validate" CausesValidation="true" />
<asp:CustomValidator ID="cvRequired" ControlToValidate="InstCmbx$TextBox" runat="server"
ClientValidationFunction="validate" Display="None" ValidationGroup="Validate"/>
This is not working, I checked out the issue tracker on Ajax site as well, but they said that I must append "$TextBox" in the Id and it will work, but then also it is not working.
I am not able to call a simple javascript function from the same:
function validate(sender, args) {
alert("gasfkgsjkds");
}
Well there is a way for doing this as this will not work directly for the Ajax combobox. We need to extract the Text Box control from the Ajax Combobox and then calling a function on its "OnBlur" client side events.