-
Nov 21st, 2018, 03:22 AM
#1
Thread Starter
Junior Member
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
-
Nov 21st, 2018, 06:23 AM
#2
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Sep 23rd, 2019, 02:39 AM
#3
Member
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
Hi @armm1388,
Try using
Code:
mycombobox.SelectedIndex=-1
or
Code:
mycombobox.Items.Clear();
-
Sep 25th, 2019, 02:45 PM
#4
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
-
Sep 27th, 2019, 05:32 AM
#5
Re: text property of combobox (of Ajaxcontroltoolkit ) don't be clear.
@Tech.
It's a 2018 post
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|