Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
278
UltraCombo AutoCompleteMode.SuggestAppend problem
posted

Hello, Infragistics Team!

I use AutoCompleteMode.SuggestAppend!

1)Then i write some text in combo, it append my text, but after i press Enter, i get that Combo.Value == null and Combo.SelectedRow  == null (i try to catch this param in AfterCloseUp event). If i again open and close Combo, get right SelectedRow.

2)It was very unexpectedly for me, then after i write some text (for example 'bla-bla-bla'), which had not include in combo.datasoure, then combo.Value ='bla-bla-bla'. In previous version value was null in this situation.

Thanks. //Sorry for my English.

 

  • 69832
    Suggested Answer
    Offline posted

    1. This is because AfterCloseUp fires before the value is assigned. You can get around this using BeginInvoke to define a method to be called after AfterCloseUp has fired, at which time the Value and SelectedRow will have been assigned.

    Example:
    void ultraCombo_AfterCloseUp(object sender, EventArgs e)
    {
        this.BeginInvoke( new MethodInvoker(this.ultraCombo_AfterCloseUpAsync) );
    }

    void ultraCombo_AfterCloseUpAsync()
    {
        object val = this.myCombo.Value;
        UltraGridRow selectedRow = this.myCombo.SelectedRow;
    }

     

    2. As far as I know this has always been the case - the SelectedRow would return null, but the Value property returns the text in the edit portion. The exception to this rule is when the DropDownStyle property is set to 'DropDownList'.