Post back on input

2 posts, 0 answers
  1. John
    John avatar
    11 posts
    Member since:
    Mar 2015

    Posted 29 Jun 2015 Link to this post

    I've added a RadAutoCompleteBox to a web control but when you type it causes a post back even though I have set Autopostback="false".

    No results are returned


    <telerik:RadAutoCompleteBox ID="RadAutoCompany" Runat="server" InputType="Text" TextSettings-SelectionMode="Single" AutoPostBack="False" Delimiter=";" Width="200px"
              DataSourceID="SqlDataSource1" DataTextField="CompanyName" DataValueField="CompanyId" DropDownWidth="150px" EmptyMessage="type company name">

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="SELECT [CompanyId], [CompanyName] FROM [Company] ORDER BY [CompanyName]"></asp:SqlDataSource>

  2. Nencho
    Nencho avatar
    1662 posts

    Posted 01 Jul 2015 Link to this post

    Hello John,

    If you are referring to the requests that are triggered at each character typed/deleted in the input of the control - they are actually callbacks, which are triggered in order to acquire the underlying datasource, corresponding to the type in the input search criteria. This is the defaulted behavior of the control and it is by design.

    If you need to avoid this behavior, you can set the EnableClientFiltering property of the control true. Thus,  the RadAutoCompleteBox is initially supplied with the underlying DataSource and no requests will be triggered upon each typed character.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top