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

autocomplete hidden at page load does not work when made visible

9 Answers 151 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 20 Sep 2012, 08:11 PM
I have an autocompletebox in a div with display:none set. If I change the display on the div to make the autocompletebox visible it does not work. However if when the page loads the div is not hidden it works perfectly.

9 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 21 Sep 2012, 02:40 PM
Hi Jeremy,

We are aware of this issue and have already started researching it.
I will update this thread once we find a solution.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jeremy
Top achievements
Rank 1
answered on 05 Nov 2012, 11:05 PM
Any word on whether this will be fixed in the next release?
0
Kalina
Telerik team
answered on 06 Nov 2012, 12:03 PM
Hello Jeremy,

We managed to find what causes the issue, currently we research for a possible fix.
Meanwhile - can you provide us some working code that illustrates your implementation?
How exactly you show/hide the RadAutoCompleteBox?
We can try to provide a workaround for your particular scenario.

All the best,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Matthew Botting
Top achievements
Rank 1
answered on 27 Dec 2012, 10:32 PM
I am also experiencing this issue and would like an update as to whether it something that is likely to be addressed in a release sometime in the near future or if I should find a workaround to the issue.

My implementation is as follows, the autocomplete is starting out in a hidden div as per below

<div style="display: none">

<telerik:RadAutoCompleteBox runat="server" ID="autocomplete">

</telerik:RadAutoCompleteBox>

</div>


Then using jQuery I am picking it up and re-using it across a repeater so that I only need the overhead of having 1 autocompletebox on the page. Whilst I understand you probably don't support this type of thing with your controls I have quite successfully applied to same approach to comboboxes. Also If I se the div around the completebox to be initially visible this works a treat. Note that I have additional code that clears the completebox, loads the initial values into it then extracts them when done.

var picker = $find($telerik.$("div[id$=_autocomplete]").attr("id"));

var $picker = $telerik.$(picker.get_inputElement()).parents("div.RadAutoCompleteBox:first");
$telerik.$("#anotherdiv").append($picker);

0
Matthew Botting
Top achievements
Rank 1
answered on 03 Jan 2013, 01:12 AM

I have implemented the following workaround for the time being.

The div now has an id set against it and is initially visible

 

<div id="hiddenDiv">
<telerik:RadAutoCompleteBox runat="server" ID="autocomplete">
</telerik:RadAutoCompleteBox>
</div>

Then in page load codebehind

 

ScriptManager.RegisterStartupScript(Me, Me.GetType(), "init", "setTimeout(""var hdnDiv = $get('hiddenDiv');if(hdnDiv) hdnDiv.style.display = 'none';"",100);", True)
0
Kalina
Telerik team
answered on 03 Jan 2013, 08:36 AM
Hello Matthew Botting,

Thank you for posting your solution here.
What is the version of RadControls for ASP.NET AJAX that you use?
Indeed, there was an issue when RadAutoCompleteBox is initially invisible, that has been already fixed.

Greetings,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Matthew Botting
Top achievements
Rank 1
answered on 03 Jan 2013, 08:46 PM
Thanks Kalina,
I am currently using 2012.3.1205.40 which I believe to be the latest release.
If you are referring to the latest internal build I will wait for the released version.

Regards,
Matt
0
Kalina
Telerik team
answered on 09 Jan 2013, 08:39 AM
Hello Matthew Botting,

Our latest Service Pack Release - Q3 2012 SP2 (version 2012.3.1308)
of RadControls for ASP.NET AJAX is live and available for download.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Matthew Botting
Top achievements
Rank 1
answered on 15 Jan 2013, 12:21 AM
Thanks again Kalina,
I have just downloaded the service pack and the Autocompletebox now works initially when set to display: none without having to use a setTimeout script.

Regards,
Matt
Tags
AutoCompleteBox
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Jeremy
Top achievements
Rank 1
Matthew Botting
Top achievements
Rank 1
Share this question
or