Pergunta

I can't seem to find this anywhere. Is there a way to select the full display text of the combobox when the user clicks in the combobox to filer? By default, when the user clicks into the combobox, the the user has to manually select the full text and delete. I would like to select the text for them so all they would have to do is hit the delete button to remove it.

Foi útil?

Solução

You can do this by adding a focus-event in the underlying Textbox of the Autocomplete-Control.

See this jsFiddle for a demo: Click Me

Code:

$('input').focus(function(e) {
    $(this).select();
});
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top