Webcombo OnAfterItemSelected function not calling after selecting an item

1 reply. Last post: December 20, 2013 2:37 AM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Eray GeveciMember

Hello, iam using a Webcombo with autocomplete in a webgrid.

When i enter a text and jump to the next section than the onafteritemselected function is not calling because i didn't select any item. 

Here is my workflow:

- i enter a text in the first webcombo

- jump to the next section in Webgrid before webcombo can find a result

- the method onafteritemselected isn't calling  ( this is ok and not an error)


- i delete the text from the webcombo and type the same again

- wait until it finds the correct result

- select the item 

- the function onafteritemselcted isn't calling (this is the error)


- i delete the text again

- type another text (not the same)

- select the item

- the function onafteritemselcted works again


it has to do with the same text i type after i jump to the next section before it finds the result.


here is my webcombo:

<ISWebCombo:WebCombo UseCachedDataOnFirstLoad="True" ID="WebCombo1" 

                runat="server" Height="20px" Latency="10" UseDefaultStyle="True"
                Width="50px" DataMember="PERSONAL" DataSourceID="ISDataSource1" 
                DataTextField="TRIGRAM" DataValueField="TRIGRAM" >
                <LayoutSettings EntryMode="AutoComplete" AlwaysShowAllRowsOnDropdown="true" ComboMode="MultipleColumns"
                    AllowAddItem="True" ColumnWidthDefault="200px">
                    <ClientSideEvents  OnAfterItemSelected="WebCombo1_OnAfterItemSelected" />
                </LayoutSettings>
            </ISWebCombo:WebCombo>

 

here is the function:

 function WebCombo1_OnAfterItemSelected(controlId) {
            var WebCombo1 = ISGetObject("WebCombo1");
            var grid = ISGetObject("WebGrid1");
            grid.GetSelectedObject().ToRowObject().GetCell('NAME').SetText(WebCombo1.GetSelectedRow().cells[1].innerText, true);
            var HiddenTrigramCheck = document.getElementById("HiddenTrigramCheck");
            HiddenTrigramCheck.value = "true"
            return true;
        }

 

All times are GMT -5. The time now is 11:05 PM.
Previous Next