I have a simple WebDropDown control that I wanted to reset back to blank, or nothing selected. I'm used to doing this with a -1 as the index value on standard dropdown controls but I've tried that and numerous other things and still can't get it to blank out the selection.
This form the dropdown resides on can be reused immediately after submitting but I need the dropdown fields to all be reset to as they are upon initial form load. I'm sure I'm missing something simple...
This is using the latest version of Infragrastics 2009 ASP.NET Controls (Service Release applied).
Ahh ignore this. Found another thread that explains that this is by design as it emulates the Microsoft drop down control. It would be a good feature to add back in though guys as your controls are supposed to add more functionality ;-)
Cheers, Rob.
This doesn't work when DisplayMode="DropDownList", i.e. not a WebDropDown where you can type text in. So how do you emulate the SelectedItemIndex = -1 as in the original classic version?
At present, I've had to modify the code to include a blank entry in the list which is a bit of a fudge.
Thanks, Rob.
Hey Craig,
If you refer to the input box's text - I think uou can set the CurrentValue property to some text, i.e. CurrentValue="<enter some text>" or just CurrentValue="" - in either the ASPX or code behind.
Hope this helps,
Angel