This is a migrated thread and some comments may be shown as answers.

Launch AutopostBack on Client Filring mode

2 Answers 79 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Zakaria
Top achievements
Rank 1
Zakaria asked on 06 Sep 2018, 09:46 AM

<tlk:RadAutoCompleteBox runat="server" ID="cmb_numDep" EmptyMessage="Taper ..."

     InputType="Text"Width="298px"TextSettings-SelectionMode="Single"  AutoPostBack="True"

     EnableClientFiltering="true"DropDownHeight="150"></tlk:RadAutoCompleteBox>

The AutoPostBack does’t work !! I want to keep clientFiltring enabled and launch postback when selecting value !

Is their a way to do it without using JavaScript ?

2 Answers, 1 is accepted

Sort by
0
Zakaria
Top achievements
Rank 1
answered on 06 Sep 2018, 10:23 AM
PS: When postBack is launched by another control the RadAutoCompleteBox data is cleared !! Why ?
0
Accepted
Peter Milchev
Telerik team
answered on 11 Sep 2018, 08:54 AM
Hello Zakaria,

We have tested the described scenario and it seems that it is working as demonstrated in this screencast - https://screencast-o-matic.com/watch/cFQXjJqGK6. Regarding the postback, it will be triggered automatically by the AutoCompleteBox if you have an OnTextChanged event handler, you select an item and blur the control.

<asp:Label ID="Label1"  runat="server" />
<hr />
<telerik:RadButton runat="server" ID="RadButton1" Text="Postback" AutoPostBack="true" />
<telerik:RadAutoCompleteBox runat="server" OnTextChanged="RadAutoCompleteBox1_TextChanged" EmptyMessage="Taper ..."
    InputType="Text" Width="298px" TextSettings-SelectionMode="Single" AutoPostBack="True"
    EnableClientFiltering="true" DropDownHeight="150" ID="RadAutoCompleteBox1">
</telerik:RadAutoCompleteBox>
protected void Page_Init(object sender, EventArgs e)
{
    RadAutoCompleteBox1.DataSource = new string[] { "a", "aa", "aaa" };
    RadAutoCompleteBox1.DataBind();
}
 
protected void Page_Load(object sender, EventArgs e)
{       
    Label1.Text = DateTime.Now.ToString();
}
 
protected void RadAutoCompleteBox1_TextChanged(object sender, Telerik.Web.UI.AutoCompleteTextEventArgs e)
{
         
}

If you still have issues with cleared values of the AutoCompleteBox, please prepare a sample project and attach it as a sample project in an official support ticket. This would allow us to investigate locally and help you more efficiently. 

Once we find a solution, we can share it here for convenience and better visibility from the community.

Regards,
Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AutoCompleteBox
Asked by
Zakaria
Top achievements
Rank 1
Answers by
Zakaria
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question
or