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.

有帮助吗?

解决方案

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();
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top