Hello!
I found out that OnClientEntryAdded handler runs twice when AllowCustomEntry="true", which is somewhat undesirable behavior. There's a simple reproduction below. One should put a breakpoint in ClientEntryAdded() and in ServerEntryAdded(). The consequence of steps is
1) ClientEntryAdded()
2) ServerEntryAdded()
3) ClientEntryAdded()
Default.aspx
Default.aspx.cs
I found out that OnClientEntryAdded handler runs twice when AllowCustomEntry="true", which is somewhat undesirable behavior. There's a simple reproduction below. One should put a breakpoint in ClientEntryAdded() and in ServerEntryAdded(). The consequence of steps is
1) ClientEntryAdded()
2) ServerEntryAdded()
3) ClientEntryAdded()
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestFocusOnAutocomplete._Default" %><%@ Register Assembly="Telerik.Web.UI, Version=2012.3.1120.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 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></title> <script type="text/javascript"> function ClientEntryAdded(sender, eventArgs) { } </script></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server" /> <telerik:RadAutoCompleteBox runat="server" AllowCustomEntry="true" OnClientEntryAdded="ClientEntryAdded" OnEntryAdded="ServerEntryAdded" ID="racb" /> </div> </form></body></html>Default.aspx.cs
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;using System.Threading;namespace TestAutocomplete{ public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { racb.DataSource = new List<string>(); racb.DataBind(); } protected void ServerEntryAdded(object sender, AutoCompleteEntryEventArgs e) { } }}