Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Dear Sir,
I have use auto complete Extender in my project its fetching data properly but it is working so slowly.
I want to increase its speed

please Help me.
Posted
Updated 4-May-11 19:47pm
v2
Comments
Sandeep Mewara 5-May-11 2:18am    
How do we know what and if there is an issue? Your question is quite open and it would be difficult for anyone to comment. You have hardly shared anything - code, scenario, amount of data, etc.

1 solution

Set Following property in AutoCompleteExtender



<asp:panel id="divwidth" runat="server" cssclass="divwidth" style="position:absolute; z-index:10; border-width:medium" xmlns:asp="#unknown">

<ajaxtoolkit:autocompleteextender id="AutoCompleteExtender2" runat="server" targetcontrolid="txtControlId" xmlns:ajaxtoolkit="#unknown">
CompletionListItemCssClass="listItem" CompletionListHighlightedItemCssClass="highlightedListItem"
ServicePath="WebServMads.asmx" ServiceMethod="getStudent" MinimumPrefixLength="3"
CompletionListCssClass="completionListElement" CompletionSetCount="20"
CompletionInterval="500" FirstRowSelected="true" OnClientItemSelected="getSelectedStudent" OnClientPopulated="OnClientPopulated"
CompletionListElementID="divwidth">

function getSelectedStudent(source, eventArgs)
{
//debugger;
document.getElementById('<%= hdnStudent.ClientID %>').value = eventArgs.get_value();
if(document.getElementById('<%= hdnStudent.ClientID %>').value != '')
{
var textValue = eventArgs.get_value().split("-");
if(textValue.length > 0)
{
document.getElementById('<%= txtStudent.ClientID %>').value = textValue[0];
}
}
}

function OnClientPopulated(sender, eventArgs)
{
debugger

var autoList = sender.get_completionList();
for (i = 0; i < autoList.childNodes.length; i++)
{
var text = autoList.childNodes[i].firstChild.nodeValue;
autoList.childNodes[i]._value = text;
autoList.childNodes[i].innerHTML = " " + text;
}


In select Statement select only required column. (not use select * from tablename)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900