Code & steps to replicate the issue.
<telerik:RadButton runat="server" ID="RadButton1" Text="Target Button" AutoPostBack="true" EnableViewState="true" />
<br />
<br />
<telerik:RadButton runat="server" ID="RadButton2" Text="Toggle Enabled State and Do PostBack" OnClientClicked="toggleEnabledState" AutoPostBack="true" />
<script>
function toggleEnabledState(sender, args) {
var radButton1 = $find("<%= RadButton1.ClientID %>");
radButton1.set_enabled(!radButton1.get_enabled());
}
</script>
When AjaxManager and CompareValidator are both placed on the same Page, the RadButton as the DefaultButton for the Panel does not make a Postback if hitting the Enter key while the focus is on the TextBox.
Code to replicate the problem:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />
<table>
<asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearch">
<tr>
<td>
<telerik:RadTextBox ID="txtSearch" runat="server" MaxLength="25" Width="100%" InputType="Number"></telerik:RadTextBox>
<asp:CompareValidator ID="cmpDataType" runat="server" ControlToValidate="txtSearch" Operator="DataTypeCheck" Type="Integer" Display="Dynamic" Text="Value must be integer" ValidationGroup="SearchGroup">
</asp:CompareValidator>
<telerik:RadButton ID="btnSearch" runat="server" Text="Search" Primary="true" OnClick="btnSearch_Click" UseSubmitBehavior="true" ValidationGroup="SearchGroup">
</telerik:RadButton>
<%--<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />--%>
</td>
</tr>
</asp:Panel>
</table>
C# - Code to display the message when the button successfully performs the PostBack on Enter.
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Write("Search button clicked!");
}
The behavior works fine with a regular ASP Button.