1 vote
closed
Add a promptValue & emptyValue to CascadingDropDown

Description

 
With a promptValue & emptyValue it would be possible to use validators with the CascadingDropDowns.

Currently the value for the prompt is empty, null, which makes it useless icw a validator.
If we are able to define a promptValue, we could use ie. a rangeValidotor to force a selection.

With the emptyValue we could specify a value that would satisfy the rangeValidator, so the user is not forced to select an option, because she can not.

// Ryan


Closed Aug 1 2007 at 8:55 PM  by AjaxTK

Comments

most recent at top (show oldest at top)
wrote Aug 1 2007 at 8:55 PM
Resolved with changeset 25259.

RyanHeath wrote Jul 25 2007 at 7:07 PM
This patch adds the proposed features.

RyanHeath wrote Jul 24 2007 at 4:20 PM
While we are at it: consider adding a EmptyText too.

main change in the js is:

// Populate prompt text (if available)
var headerText;
if (gettingList && this._loadingText) {
headerText = this._loadingText;
} else if (this._promptText) {
if ( list && list.length == 0 && this._emptyText != null) {
headerText = this._emptyText;
} else {
headerText = this._promptText;
}
}
if (headerText) {
var headerValue;
if ( list && list.length == 0) {
headerValue = this._emptyValue == null ? "" : this._emptyValue;
} else {
headerValue = this._promptValue == null ? "" : this._promptValue;
}
var optionElement = new Option(headerText, headerValue);
e.options[e.options.length] = optionElement;
}

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987