locked
Auto Complete Extender ContextKey assignment without $find method RRS feed

  • Question

  • User9952089 posted

    I have a Ajax Auto Complete Extender which works perfectly to get the data as user types, but now I wants to go one step further and filter the resultset. so I am trying to pass the contextkey in javascript, but my $find method doesn't work for some reason. I try to use this generic code that we used all time, but for some reason, it doesn't return anything when I do $find.

     if($find('<%=CompleteExtenderXYZ.ClientID%>')){
                $find('<%=CompleteExtenderXYZ.ClientID%>').set_contextKey($get("<%=txtPQR.ClientID %>").value);
            }

    Any idea what is alternative way to set the Contextkey?? using any other syntax??

    Monday, September 28, 2015 4:20 PM

Answers

  • User61956409 posted

    Hi nicksoft,

    If you check your html code, you will find AutoCompleteExtender will just show us a completion List like this.

    So we could not set ContextKey property of AutoCompleteExtender via jQuery.

    Besides, you could refer to this link.

    http://stackoverflow.com/questions/5564459/asp-net-autocomplete-set-contextkey-object-doesnt-support-this-property-or-met

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 28, 2015 11:34 PM
  • User9952089 posted

    Fei, thanks for the update, but i am not using jquery and i am familiar with html rendering of the autoextender control. But most of all articles/refernces i have seen for auto extender to set the context key is using the $find method only. for some reason $find does not work for my project. i have tried all sort of id's,  server ids, simple testbox id's but didn't work.

    So basically i am looking to find out why $find doesn't work?? or any other alternatice way that i can set context key of Autocompleteextender??

    Please assist or refer any article if you have any.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 29, 2015 9:19 AM
  • User9952089 posted

    i think i figured out the issue, that my autocompleteextender was inside tabcontainer panel somewhere using DOM Developer tools..so i end us using id like $find("tabcontainer1_tabcontainer2_autextender1") and it did the trick. i did not have to use any server side evaluation syntax like ".ControlId"%>"

    i think this forums help to explain some sort of details to other members, but it would be nice to share the screen using this forums by scheduling the session inside this forum to resolve some hidden details when we explain the problem. I think this ASP.NET Forums should be expanded to Schedule session and share the screen features to cross the bridge and have this volunteer community help go one step further.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 1, 2015 10:40 AM

All replies

  • User61956409 posted

    Hi nicksoft,

    If you check your html code, you will find AutoCompleteExtender will just show us a completion List like this.

    So we could not set ContextKey property of AutoCompleteExtender via jQuery.

    Besides, you could refer to this link.

    http://stackoverflow.com/questions/5564459/asp-net-autocomplete-set-contextkey-object-doesnt-support-this-property-or-met

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 28, 2015 11:34 PM
  • User9952089 posted

    Fei, thanks for the update, but i am not using jquery and i am familiar with html rendering of the autoextender control. But most of all articles/refernces i have seen for auto extender to set the context key is using the $find method only. for some reason $find does not work for my project. i have tried all sort of id's,  server ids, simple testbox id's but didn't work.

    So basically i am looking to find out why $find doesn't work?? or any other alternatice way that i can set context key of Autocompleteextender??

    Please assist or refer any article if you have any.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 29, 2015 9:19 AM
  • User9952089 posted

    i think i figured out the issue, that my autocompleteextender was inside tabcontainer panel somewhere using DOM Developer tools..so i end us using id like $find("tabcontainer1_tabcontainer2_autextender1") and it did the trick. i did not have to use any server side evaluation syntax like ".ControlId"%>"

    i think this forums help to explain some sort of details to other members, but it would be nice to share the screen using this forums by scheduling the session inside this forum to resolve some hidden details when we explain the problem. I think this ASP.NET Forums should be expanded to Schedule session and share the screen features to cross the bridge and have this volunteer community help go one step further.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 1, 2015 10:40 AM