text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
Hello
i use from ajaxcontroltoolkit for a combobox.
for search sometimes i nead to cleat text property of my combobox until search method return all record (without filter)
but the command (mycombobox.text = "") dont work. why?
Thanks
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
Haven't worked with asp.net combo for a looong time but I'm guessing that you need to clear the items of the combobox. Clearing like you do so looks to me that it clears the name of the control.
So something like mycombobox.item(0).text ="" look like more sufficient.
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
Hi @armm1388,
Try using
Code:
mycombobox.SelectedIndex=-1
or
Code:
mycombobox.Items.Clear();
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
setting the .Text doesn't clear the selection... setting .SelectionIndex to -1 will...
.Items.Clear will clear out all items from the combobox... I don't think that's really what you want... start by setting .SelectedIndex = -1 first... see if that gets you the desiref effect.
-tg
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
@Tech.
It's a 2018 post :p