AutoCompleteText box is not retaining its value on post back
February 3, 2012 07:15 AM by Varalakshmi R.S[Syncfusion]
Vijay
AutoCompleteText box is not retaining its value on post back
February 2, 2012 02:32 AM
Hi,

Im using syncfusion version 9.4.0.62 and using autocompeltetextbox. The problem was it was not retainig the value supplied as input. so AutoCompleteTextBox1.Text property is having empty value always. Below is the code.

<syncfusion:AutoCompleteTextBox ID="autoCompTextProjectName" Font-Names="verdana,arial,helvetica,sans-serif" Font-Size="8pt" runat="server" EnableViewState="true" AllowFreeFormEntry="true"
Width="200px" OnTextChanged="autoCompTextProjectName_TextChanged" OnProvideChoiceListOnCallback="autoCompTextProjectName_ProvideChoiceListOnCallback"
DDBackColor="MintCream" DDcssClass="SelectionClass" Visible="false"></syncfusion:AutoCompleteTextBox>


protected void autoCompTextProjectName_ProvideChoiceListOnCallback(object sender, Syncfusion.Web.UI.WebControls.Tools.ACUserChoiceListEventArgs e)
{
e.ChoiceList = ProjectNames; //This is an arraylist
}

- Vijay


Varalakshmi R.S
[Syncfusion]
AutoCompleteText box is not retaining its value on post back
February 3, 2012 01:22 AM
Hi Vijay,

Thanks for contacting Syncfusion forums.

We have checked the code provided by you and found that “AutoPostBack” property was not enabled to retrieve the updated text from AutoCompleteTextBox. Kindly enable this property and the text. Please refer the code given below to achieve this,


[ASPX]
<syncfusion:AutoCompleteTextBox ID="autoCompTextProjectName" Font-Names="verdana,arial,helvetica,sans-serif" Font-Size="8pt" runat="server" EnableViewState="true" AllowFreeFormEntry="true"
Width="200px" OnProvideChoiceListOnCallback="AutoCompleteTextBox1_ProvideChoiceListOnCallback1" AutoPostBack="true"
DDBackColor="MintCream" DDcssClass="SelectionClass" ></syncfusion:AutoCompleteTextBox>


We have also prepared a sample to depict this behavior and the sample can be downloaded from the following link,
autocomplete142004666.zip

Kindly try the sample and let us know if it helps.

Regards,
Varalakshmi



Vijay
AutoCompleteText box is not retaining its value on post back
February 3, 2012 04:38 AM
Hello Varalakshmi,

I tried that already by setting the Autopostback = true, and my autocompletion text box was there inside an update panel. So post back is happening for any text change in the control but that text what the user is entering is not available in the post back of this cotrol or may be other control's post back.


Thanks.

- Vijay



Varalakshmi R.S
[Syncfusion]
AutoCompleteText box is not retaining its value on post back
February 3, 2012 07:15 AM
Hi Vijay,

Thanks for the update.

The selected text have not been updated in the AutoCompleteTextBox due to partial post back when this is included inside an update panel. You can check the same scenario with asp textbox where as the value have not been updated here also.

Kindly check the details and let us know if you would require further assistance on this.

Regards,
Varalakshmi


::adCenter::