Completed
Last Updated: 13 Aug 2013 09:11 by ADMIN
ADMIN
Georgi I. Georgiev
Created on: 13 Aug 2013 09:11
Category: Editors
Type: Bug Report
1
FIX. RadAutoCompleteTextBox - Focus is lost when the close button on TokenizedTextBlockElement is clicked
To reproduce:
Add RadAutoCompleteTextBox, add a AutoCompleteDataSource, complete a word, click the close button of the word, try to type.
Workaround:
void RadForm1_Load(object sender, EventArgs e)
{
    RemoveFocus();
}

void radAutoCompleteBox1_TextChanged(object sender, EventArgs e)
{
    RemoveFocus();
}

private void RemoveFocus()
{
    foreach (var item in this.radAutoCompleteBox1.TextBoxElement.ViewElement.Children)
    {
        foreach (var btn in item.Children)
        {
            var radButtonElement = btn as RadButtonElement;
            if (radButtonElement != null)
            {
                radButtonElement.CanFocus = false;
            }
        }
    }
}
0 comments