Finny,
I got one more issue.
What I did is I add this code and javascript function.Now I am getting my results properly.
But my problem is when I highlight that row and user clicks it I want to fire the onselectedevent change for dropdown.
Now for my case it won't work because my selected row is now the displayed one.I want the behaviour to be similar to highlighting a dropdown and pressing a key, which will then take you to the first instance of the dropdown item that starts with the letter pressed.
Is there any idea how to achieve
My code
- function filtedropdown(pattern, list){
-
-
if (!list.bak){
-
-
list.bak = new Array();
-
for (n=0;n<list.length;n++){
-
list.bak[list.bak.length] = new Array(list[n].value, list[n].text);
-
}
-
}
-
-
var selectedItempos=0;
-
for (n=0;n<list.bak.length;n++){
-
var indexOfLastName=list.bak[n][1].indexOf(',');
-
var lastNameSubstring=list.bak[n][1].toLowerCase().substring(0,indexOfLastName);
-
if((lastNameSubstring.toLowerCase().indexOf(pattern.toLowerCase())!=-1)
-
&& (lastNameSubstring.toLowerCase().indexOf(pattern.toLowerCase())==0)){
-
selectedItempos=n;
-
break;
-
}
-
}
-
list[selectedItempos].selected=true;
-
}
-
<asp:Panel id="pnlProviderList" runat="server" visible="false">
-
Skip to letter:
-
<input type="text" name="txtSkip" onkeyup="filtedropdown(this.value,<%= ddlProvider.ClientID %>)" onchange="filtedropdown(this.value,<%= ddlProvider.ClientID %>)"/>
-
Provider:
-
<ewc:EmblemDropDownList runat="server" ID="ddlProvider" AutoPostBack="true"
-
OnSelectedIndexChanged="ddlProvider_SelectedIndexChanged" />
-
</asp:Panel>