Loading ...
Sorry, an error occurred while loading the content.

AutoComplete Selected Row [Simple but Urgent]

Expand Messages
  • usmans1
    Hi Friends, Is there any way to know the Selected Row of an AutoComplete control. Like we have in data table functions getSelectedRows(),getSelectedTrEls, do
    Message 1 of 2 , Jan 27, 2009
    • 0 Attachment
      Hi Friends,

      Is there any way to know the Selected Row of an AutoComplete control.
      Like we have in data table functions
      getSelectedRows(),getSelectedTrEls, do we have same functions in
      Autocomplete, or get the same functionality done.

      I know one of the option is to keep a selected flag in your local
      datasource schema, which is binding with your autocomplete. The
      _elCurListItem property of the autocomplete is also always null.

      I want to get the selected Row of different autocomplete controls and
      perform some action.

      If any one knows how to get the selected Row for the Autocomplete
      Control, please let me know. It will be a great help for me.

      Thanks alot.

      ~Cheers
    • jennykhan
      Hi usmans1, How about subscribing to the itemSelectEvent? myAutoComplete.itemSelectEvent.subscribe(function(sType, aArgs) { var myAC = aArgs[0]; // reference
      Message 2 of 2 , Feb 5 4:23 PM
      • 0 Attachment
        Hi usmans1,

        How about subscribing to the itemSelectEvent?

        myAutoComplete.itemSelectEvent.subscribe(function(sType, aArgs) {
        var myAC = aArgs[0]; // reference back to the AC instance
        var elLI = aArgs[1]; // reference to the selected LI element
        var oData = aArgs[2]; // selected item's result data
        });

        Cheers,
        Jenny




        --- In ydn-javascript@yahoogroups.com, "usmans1" <usmans1@...> wrote:
        >
        > Hi Friends,
        >
        > Is there any way to know the Selected Row of an AutoComplete
        control.
        > Like we have in data table functions
        > getSelectedRows(),getSelectedTrEls, do we have same functions in
        > Autocomplete, or get the same functionality done.
        >
        > I know one of the option is to keep a selected flag in your local
        > datasource schema, which is binding with your autocomplete. The
        > _elCurListItem property of the autocomplete is also always null.
        >
        > I want to get the selected Row of different autocomplete controls
        and
        > perform some action.
        >
        > If any one knows how to get the selected Row for the Autocomplete
        > Control, please let me know. It will be a great help for me.
        >
        > Thanks alot.
        >
        > ~Cheers
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.