ui.igNumericEditor
The igNumericEditor control accepts a wide array of numeric input. You can optionally choose to make spin buttons available on the editor. Further information regarding the classes, options, events, methods and themes of this API are available under the associated tabs above.
For more igNumericEditor API details, refer to the igEditor API documentation.
The following code snippet demonstrates how to initialize the igNumericEditor control.
Click here for more information on how to get started using this API. For details on how to reference the required scripts and themes for the igNumericEditor control read, Using JavaScript Resources in Ignite UI and Styling and Theming Ignite UI.Code Sample
<!doctype html> <html> <head> <!-- Infragistics Combined CSS --> <link href="css/themes/infragistics/infragistics.theme.css" rel="stylesheet" type="text/css" /> <link href="css/structure/infragistics.css" rel="stylesheet" type="text/css" /> <!-- jQuery Core --> <script src="js/jquery.js" type="text/javascript"></script> <!-- jQuery UI --> <script src="js/jquery-ui.js" type="text/javascript"></script> <!-- Infragistics Combined Scripts --> <script src="js/infragistics.core.js" type="text/javascript"></script> <script src="js/infragistics.lob.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#numericEditor").igNumericEditor({ dataMode: "int", maxValue: 100, minValue: 0, buttonType: "spin", width: 190 }); }); </script> </head> <body> <input id="numericEditor" /> </body> </html>
Related Samples
Related Topics
Dependencies
Inherits
-
allowNullValue
- Type:
- bool
- Default:
- false
Gets/Sets whether the editor value can become null.
If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue).Code Sample
//Initialize $(".selector").igNumericEditor({ allowNullValue : false }); //Get var allowNullValue = $(".selector").igNumericEditor("option", "allowNullValue"); //Set $(".selector").igNumericEditor("option", "allowNullValue", false);
-
buttonType
Inherited- Type:
- enumeration
- Default:
- none
Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. Note! This option can not be set runtime.
Members
- dropdown
- Type:string
- A button to open/close the list is located on the right side of the editor.
- clear
- Type:string
- A button to clear the value is located on the right side of the editor.
- spin
- Type:string
- Spin buttons are located on the right side of the editor.
Code Sample
//Initialize $(".selector").igNumericEditor({ buttonType : "dropdown" }); //Get var button = $(".selector").igNumericEditor("option", "buttonType"); //Initialize multiple buttons $(".selector").igNumericEditor({ buttonType : "dropdown,clear" });
-
dataMode
- Type:
- enumeration
- Default:
- double
Defines the range that editor's value can accept. This is achieved by setting the minValue and maxValue editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode.
The range for the specific type follows the numeric type standards, e.g. in .NET Framework floating-point types and integral types.
In addition, the maximum value that can be set to minDecimals and maxDecimals options can be 15, when editor is in 'double' mode and 7, when in 'float' mode.Members
- double
- Type:string
- the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option allowNullValue. Note: that is used as default.
- float
- Type:string
- the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option allowNullValue.
- long
- Type:string
- the Number object is used with the limits of a signed long and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- ulong
- Type:string
- the Number object is used with the limits of an unsigned long and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- int
- Type:string
- the Number object is used with the limits of a signed int and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- uint
- Type:string
- the Number object is used with the limits of an unsigned int and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- short
- Type:string
- the Number object is used with the limits of a signed short and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- ushort
- Type:string
- the Number object is used with the limits of an unsigned short and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- sbyte
- Type:string
- the Number object is used with the limits of a signed byte and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
- byte
- Type:string
- the Number object is used with the limits of an unsigned byte and if the value is not set, then the null or 0 is used depending on the option allowNullValue.
Code Sample
//Initialize $(".selector").igNumericEditor({ dataMode : "int" }); //Get var dataMode = $(".selector").igNumericEditor("option", "dataMode");
-
decimalSeparator
- Type:
- string
- Default:
- null
Gets/Sets the character, which is used as decimal separator.
Note: this option has priority over possible regional settings.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.
Note: This option's value should not be equal to the value of groupSeparator or negativeSign options.Code Sample
//Initialize $(".selector").igNumericEditor({ decimalSeparator : "," }); //Get var separator = $(".selector").igNumericEditor("option", "decimalSeparator"); //Set $(".selector").igNumericEditor("option", "decimalSeparator", ",");
-
disabled
Inherited- Type:
- bool
- Default:
- false
Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted.
Code Sample
//Initialize $(".selector").igNumericEditor({ disabled : false }); //Get var disabled = $(".selector").igNumericEditor("option", "disabled"); //Set $(".selector").igNumericEditor("option", "disabled", true);
-
dropDownAnimationDuration
Inherited- Type:
- number
- Default:
- 300
Gets/Sets show/hide drop-down list animation duration in milliseconds.
Code Sample
//Initialize $(".selector").igNumericEditor({ dropDownAnimationDuration: 500 }); //Get var animationShowDuration= $(".selector").igNumericEditor("option", "dropDownAnimationDuration"); //Set $(".selector").igNumericEditor("option", "dropDownAnimationDuration", 500);
-
dropDownAttachedToBody
Inherited- Type:
- bool
- Default:
- false
Gets wheather the drop-down list element is attached to the body of the document, or to the editor container element.
If the option is set to false the editor will attach the drop-down list element to the editor container
If the option is set to true the editor will attach its drop-down list to as a child of the body.
Note! This option can not be set runtime.Code Sample
//Initialize $(".selector").igNumericEditor({ dropDownAttachedToBody : true }); //Get var attachedToBody = $(".selector").igNumericEditor("option", "dropDownAttachedToBody");
-
dropDownOnReadOnly
Inherited- Type:
- bool
- Default:
- false
Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable.
Note! In case there are no list items - the editor will reamin readonly
Note! This option can not be set runtime.Code Sample
//Initialize $(".selector").igNumericEditor({ dropDownOnReadOnly : true }); //Get var readOnly = $(".selector").igNumericEditor("option", "dropDownOnReadOnly");
-
dropDownOrientation
Inherited- Type:
- enumeration
- Default:
- auto
Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor.
Members
- auto
- Type:string
- If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor.
- bottom
- Type:string
- The drop-down list is opened at the bottom of the editor.
- top
- Type:string
- The drop-down list is opened at the top of the editor.
Code Sample
//Initialize $(".selector").igNumericEditor({ dropDownOrientation : "top" }); //Get var orientation = $(".selector").igNumericEditor("option", "dropDownOrientation"); //Set $(".selector").igNumericEditor("option", "dropDownOrientation", "bottom");
-
groups
- Type:
- array
- Default:
- null
- Elements Type:
(array of number objects) Gets/Sets the number of digits in the integer part of a number, which are divided into groups.
The "groupSeparator" is inserted between groups.
If the sum of all values in array is smaller than the length of integer part, then the last item in array is used for all following groups.
Count of groups starts from the decimal point (from right to left).
That option has effect only in display mode(no focus).
Note: The numbers in the array must be positive integers.
Note: This option has priority over possible regional settings.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.Code Sample
//Initialize $(".selector").igNumericEditor({ groups : [1, 2, 3] }); //Get var groups = $(".selector").igNumericEditor("option", "groups"); //Set $(".selector").igNumericEditor("option", "groups", [3, 3, 3]);
-
groupSeparator
- Type:
- string
- Default:
- null
Gets/Sets the character, which is used as separator for groups (like thousands).
That option has effect only in display mode(no focus).
Note: This option has priority over possible regional settings.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.
Note: This option's value should not be equal to the value of decimalSeparator or negativeSign options.Code Sample
//Initialize $(".selector").igNumericEditor({ groupSeparator : "." }); //Get var groupSeparator = $(".selector").igNumericEditor("option", "groupSeparator"); //Set $(".selector").igNumericEditor("option", "groupSeparator", ".");
-
height
Inherited- Type:
- enumeration
- Default:
- null
Gets/Sets the height of the control.
Members
- null
- Type:object
- will fit the editor inside its parent container, if no other heights are defined.
- string
- The height can be set in pixels (px) and percentage (%).
- number
- The height can be set as a number in pixels.
Code Sample
//Initialize $(".selector").igNumericEditor({ height : 25 }); //Get var height = $(".selector").igNumericEditor("option", "height"); //Set $(".selector").igNumericEditor("option", "height", 25);
-
inputName
Inherited- Type:
- string
- Default:
- null
Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element.
Code Sample
//Initialize $(".selector").igNumericEditor({ inputName : "textField" }); //Get var inputName = $(".selector").igNumericEditor("option", "inputName"); //Set $(".selector").igNumericEditor("option", "inputName", "textField");
-
isLimitedToListValues
- Type:
- bool
- Default:
- false
Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead.
Code Sample
//Initialize $(".selector").igNumericEditor({ isLimitedToListValues : true }); //Get var limited = $(".selector").igNumericEditor("option", "isLimitedToListValues"); //Set $(".selector").igNumericEditor("option", "isLimitedToListValues", false);
-
language
Inherited- Type:
- string
- Default:
- "en"
Set/Get the locale language setting for the widget.
Code Sample
//Initialize $(".selector").igNumericEditor({ language: "ja" }); // Get var language = $(".selector").igNumericEditor("option", "language"); // Set $(".selector").igNumericEditor("option", "language", "ja");
-
listItemHoverDuration
Inherited- Type:
- number
- Default:
- 0
Gets/Sets the hover/unhover animation duration of a drop-down list item.
Code Sample
//Initialize $(".selector").igNumericEditor({ listItemHoverDuration : 100 }); //Get var hoverDuration = $(".selector").igNumericEditor("option", "listItemHoverDuration"); //Set $(".selector").igNumericEditor("option", "listItemHoverDuration", 100);
-
listItems
- Type:
- array
- Default:
- null
- Elements Type:
Gets/Sets list of items which are used as a source for the drop-down list.
Items in the list can be of type number.Code Sample
$(".selector").igNumericEditor({ listItems : [ 10, 20, 30 ] }); //Get var items = $(".selector").igNumericEditor("option", "listItems"); //Set $(".selector").igNumericEditor("option", "listItems", [10, 20, 30]);
-
listWidth
Inherited- Type:
- number
- Default:
- 0
Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width.
Code Sample
//Initialize $(".selector").igNumericEditor({ listWidth : 200 }); //Get var width = $(".selector").igNumericEditor("option", "listWidth"); //Set $(".selector").igNumericEditor("option", "listWidth", 200);
-
locale
Inherited- Type:
- object
- Default:
- null
Set/Get the locale setting for the widget.
Code Sample
//Initialize $(".selector").igNumericEditor({ locale: {} }); // Get var locale = $(".selector").igNumericEditor("option", "locale"); // Set $(".selector").igNumericEditor("option", "locale", {});
-
maxDecimals
- Type:
- number
- Default:
- null
Gets/Sets the maximum number of decimal places supported by the editor.
Note: this option has priority over possible regional settings.
Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.
Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode.Code Sample
//Initialize $(".selector").igNumericEditor({ maxDecimals: 10 }); //Get var maxDecimals = $(".selector").igNumericEditor("option", "maxDecimals"); //Set $(".selector").igNumericEditor("option", "maxDecimals", 5);
-
maxValue
- Type:
- number
- Default:
- null
Gets/Sets the maximum value which can be entered in the editor by the end user.
Code Sample
//Initialize $(".selector").igNumericEditor({ maxValue : 100 }); //Get var maxValue = $(".selector").igNumericEditor("option", "maxValue"); //Set $(".selector").igNumericEditor("option", "maxValue", 100);
-
minDecimals
- Type:
- number
- Default:
- null
Gets/Sets the minimum number of decimal places supported by the editor.
If number of digits in fractional part of number is less than the value of this option, then the "0" characters are used to fill missing digits.
Note: This option has priority over possible regional settings.
Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.
Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode.Code Sample
//Initialize $(".selector").igNumericEditor({ minDecimals: 5 }); //Get var minDecimals = $(".selector").igNumericEditor("option", "minDecimals"); //Set $(".selector").igNumericEditor("option", "minDecimals", 3);
-
minValue
- Type:
- number
- Default:
- null
Gets/Sets the minimum value which can be entered in the editor by the end user.
Code Sample
//Initialize $(".selector").igNumericEditor({ minValue: 5 }); //Get var minValue = $(".selector").igNumericEditor("option", "minValue"); //Set $(".selector").igNumericEditor("option", "minValue", 3);
-
negativePattern
- Type:
- string
- Default:
- null
Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern.
Note: This option has priority over possible regional settings.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.Code Sample
//Initialize $(".selector").igNumericEditor({ negativePattern : "- n" }); //Get var pattern = $(".selector").igNumericEditor("option", "negativePattern"); //Set $(".selector").igNumericEditor("option", "negativePattern", "- n");
-
negativeSign
- Type:
- string
- Default:
- null
Gets/Sets the character, which is used as negative sign.
Note: This option has priority over possible regional settings.
Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set.
Note: This option's value should not be equal to the value of groupSeparator or decimalSeparator options.Code Sample
//Initialize $(".selector").igNumericEditor({ negativeSign : "-" }); //Get var negativeSign = $(".selector").igNumericEditor("option", "negativeSign"); //Set $(".selector").igNumericEditor("option", "negativeSign", "-");
-
nullValue
Inherited- Type:
- enumeration
- Default:
- null
Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string.
Code Sample
//Initialize $(".selector").igNumericEditor({ nullValue : null }); //Get var nullValue = $(".selector").igNumericEditor("option", "nullValue"); //Set $(".selector").igNumericEditor("option", "nullValue", null);
-
placeHolder
Inherited- Type:
- string
- Default:
- null
Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string.
Code Sample
//Initialize $(".selector").igNumericEditor({ placeHolder : "Enter Value" }); //Get var placeHolder = $(".selector").igNumericEditor("option", "placeHolder"); //Set $(".selector").igNumericEditor("option", "placeHolder", "Enter Value");
-
preventSubmitOnEnter
Inherited- Type:
- bool
- Default:
- false
Gets/Sets if the editor should prevent form submition when enter key is pressed.
Code Sample
//Initialize $(".selector").igNumericEditor({ preventSubmitOnEnter: true }); //Get var preventSubmitOnEnter = $(".selector").igNumericEditor("option", "preventSubmitOnEnter"); //Set $(".selector").igNumericEditor("option", "preventSubmitOnEnter", true);
-
readOnly
Inherited- Type:
- bool
- Default:
- false
Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted.
Code Sample
//Initialize $(".selector").igNumericEditor({ readOnly : true }); //Get var readOnly = $(".selector").igNumericEditor("option", "readOnly"); //Set $(".selector").igNumericEditor("option", "readOnly", true);
-
regional
Inherited- Type:
- enumeration
- Default:
- defaults
Set/Get the regional setting for the widget.
Code Sample
//Initialize $(".selector").igNumericEditor({ regional: "ja" }); // Get var regional = $(".selector").igNumericEditor("option", "regional"); // Set $(".selector").igNumericEditor("option", "regional", "ja");
-
revertIfNotValid
Inherited- Type:
- bool
- Default:
- true
Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality.
Code Sample
//Initialize $(".selector").igNumericEditor({ revertIfNotValid : false }); //Get var revertIfNotValid = $(".selector").igNumericEditor("option", "revertIfNotValid"); //Set $(".selector").igNumericEditor("option", "revertIfNotValid", false);
-
roundDecimals
- Type:
- bool
- Default:
- true
Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied.
For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled,
then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456.Code Sample
//Initialize $(".selector").igNumericEditor({ roundDecimals : false }); //Get var roundDecimals = $(".selector").igNumericEditor("option", "roundDecimals"); //Set $(".selector").igNumericEditor("option", "roundDecimals", false);
-
scientificFormat
- Type:
- enumeration
- Default:
- null
Gets/Sets support for scientific format.
If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well.
Notes: The "+" character is not supported in edit mode.Members
- null
- Type:object
- scientific format is disabled.
- E
- Type:string
- scientific format is enabled and the "E" character is used.
- e
- Type:string
- scientific format is enabled and the "e" character is used.
- E+
- Type:string
- scientific format is enabled and the "E" character is used. The "E+" is used for positive values in display mode.
- e+
- Type:string
- scientific format is enabled and the "e" character is used. The "e+" is used for positive values in display mode.
Code Sample
//Initialize $(".selector").igNumericEditor({ scientificFormat : "e" }); //Get var scientificFormat = $(".selector").igNumericEditor("option", "scientificFormat"); //Set $(".selector").igNumericEditor("option", "scientificFormat", "e+");
-
selectionOnFocus
Inherited- Type:
- enumeration
- Default:
- selectAll
Gets/Sets the action when the editor gets focused. The default value is selectAll.
Members
- selectAll
- Type:string
- Setting this option will select all the text into the editor when the edit mode gets enetered.
- atStart
- Type:string
- Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered.
- atEnd
- Type:string
- Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered.
- browserDefault
- Type:string
- Setting this option won't do any extra logic, but proceed with the browser default behavior.
Code Sample
//Initialize $(".selector").igNumericEditor({ selectionOnFocus: "atStart" }); //Get var selectionOnFocus= $(".selector").igNumericEditor("option", "selectionOnFocus"); //Set $(".selector").igNumericEditor("option", "selectionOnFocus", "selectAll");
-
spinDelta
- Type:
- number
- Default:
- 1
Gets/Sets the default delta-value which is used with "spin" buttonType or spinUp and spinDown methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float.
Code Sample
//Initialize $(".selector").igNumericEditor({ spinDelta: 2 }); //Get var spinDelta= $(".selector").igNumericEditor("option", "spinDelta"); //Set $(".selector").igNumericEditor("option", "spinDelta", 2);
-
spinWrapAround
- Type:
- bool
- Default:
- false
Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit.
This applies to minValue and maxValue or cycling through list items if isLimitedToListValues is enabled.Code Sample
//Initialize $(".selector").igNumericEditor({ spinWrapAround : true }); //Get var spinAround = $(".selector").igNumericEditor("option", "spinWrapAround"); //Set $(".selector").igNumericEditor("option", "spinWrapAround", true);
-
suppressKeyboard
Inherited- Type:
- bool
- Default:
- false
Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped.
Note: The option does not perform device detection so its behavior is always active if enabled.
Note: When drop down is opened the only way to close it will be using the drop down button.Code Sample
//Initialize $(".selector").igNumericEditor({ suppressKeyboard : true }); //Get var readOnly = $(".selector").igNumericEditor("option", "suppressKeyboard"); //Set $(".selector").igNumericEditor("option", "suppressKeyboard", true);
-
suppressNotifications
Inherited- Type:
- bool
- Default:
- false
Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits.
Code Sample
//Initialize $(".selector").igNumericEditor({ suppressNotifications : true }); //Get var suppressNotifications = $(".selector").igNumericEditor("option", "suppressNotifications"); //Set $(".selector").igNumericEditor("option", "suppressNotifications", true);
-
tabIndex
Inherited- Type:
- number
- Default:
- null
Gets/Sets tabIndex attribute for the editor input.
Code Sample
//Initialize $('.selector').igNumericEditor({ tabIndex: 1 }); //Get var tabIndex = $(".selector").igNumericEditor("option", "tabIndex"); //Set $(".selector").igNumericEditor("option", "tabIndex", 1);
-
textAlign
- Type:
- enumeration
- Default:
- right
Gets/Sets the horizontal alignment of the text in the editor.
Members
- left
- Type:string
- The text into the input gets aligned to the left.
- right
- Type:string
- The text into the input gets aligned to the right.
- center
- Type:string
- The text into the input gets aligned to the center.
Code Sample
//Initialize $(".selector").igNumericEditor({ textAlign : "center" }); //Get var align = $(".selector").igNumericEditor("option", "textAlign"); //Set $(".selector").igNumericEditor("option", "textAlign", "center");
-
validatorOptions
Inherited- Type:
- object
- Default:
- null
Gets/Sets options supported by the igValidator widget.
Note: Validation rules of igValidator, such as min and max value/length are applied separately triggering errors,
while the corresponding options of the editor prevent values violating the defined rules from being entered.Code Sample
//Initialize $(".selector").igNumericEditor({ validatorOptions : { successMessage: "Success", required: true, onchange: true, notificationOptions: { mode: "popover" } } }); //Get var validateOptions = $(".selector").igNumericEditor("option", "validatorOptions"); //Set $(".selector").igNumericEditor("option", "validatorOptions", {onblur: true, onchange: true});
-
value
- Type:
- object
- Default:
- null
Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor.
Code Sample
//Initialize $(".selector").igNumericEditor({ value : 42 }); //Get var value = $(".selector").igNumericEditor("option", "value"); //Set $(".selector").igNumericEditor("option", "value", 42);
-
visibleItemsCount
Inherited- Type:
- number
- Default:
- 5
Gets the number of the items to be shown at once when the drop-down list get opened.
Notes:
This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items.
This option can not be set runtime.Code Sample
//Initialize $(".selector").igNumericEditor({ visibleItemsCount : 5 }); //Get var visibleItemsCount = $(".selector").igNumericEditor("option", "visibleItemsCount");
-
width
Inherited- Type:
- enumeration
- Default:
- null
Gets/Sets the width of the control.
Members
- null
- Type:object
- will stretch to fit data, if no other widths are defined.
- string
- The widget width can be set in pixels (px) and percentage (%).
- number
- The widget width can be set as a number in pixels.
Code Sample
//Initialize $(".selector").igNumericEditor({ width : 200 }); //Get var width = $(".selector").igNumericEditor("option", "width"); //Set $(".selector").igNumericEditor("option", "width", 200);
For more information on how to interact with the Ignite UI controls' events, refer to
Using Events in Ignite UI.
-
blur
Inherited- Cancellable:
- false
Fired when the input field of the editor loses focus.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorblur", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ blur: function (evt, ui) { ... } });
-
dropDownItemSelected
Inherited- Cancellable:
- false
Fired after an item in the drop down list is selected.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownitemselected", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownItemSelected: function (evt, ui) { ... } });
-
dropDownItemSelecting
Inherited- Cancellable:
- true
Fired when an item in the drop down list is being selected.
-
evtType: Event
JQuery event object.
-
uiType: Object
-
ownerType: Object
Gets a reference to the editor.
-
editorType: Object
Gets a reference to the editor container.
-
editorInputType: Object
Gets a reference to the editable input.
-
listType: Object
Gets a reference to the list contaier.
-
itemType: Object
Gets a reference to the list item which is about to be selected.
-
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownitemselecting", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownItemSelecting: function (evt, ui) { ... } });
-
dropDownListClosed
Inherited- Cancellable:
- false
Fired after the drop down is closed.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownlistclosed", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownListClosed: function (evt, ui) { ... } });
-
dropDownListClosing
Inherited- Cancellable:
- true
Fired when the drop down is closing.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownlistclosing", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownListClosing: function (evt, ui) { ... } });
-
dropDownListOpened
Inherited- Cancellable:
- true
Fired after the drop down is opened.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownlistopened", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownListOpened: function (evt, ui) { ... } });
-
dropDownListOpening
Inherited- Cancellable:
- true
Fired when the drop down is opening.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditordropdownlistopening", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ dropDownListOpening: function (evt, ui) { ... } });
-
focus
Inherited- Cancellable:
- false
Fired when the input field of the editor gets focus.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorfocus", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ focus: function (evt, ui) { ... } });
-
keydown
Inherited- Cancellable:
- true
Fired on keydown event.
Return false in order to cancel key action.Code Sample
//Bind after initialization $(".selector").on("ignumericeditorkeydown", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ keydown: function (evt, ui) { ... } });
-
keypress
Inherited- Cancellable:
- true
Fired on keypress event.
Return false in order to cancel key action.-
evtType: Event
JQuery event object. Use evt.originalEvent to obtain reference to event of the browser.
-
uiType: Object
-
ownerType: Object
Gets a reference to the editor.
-
elementType: Object
Gets a reference to the event target.
-
editorInputType: Object
Gets a reference to the editor input field.
-
keyType: Object
Gets the value of the keyCode.
-
originalEventType: Object
Gets a reference to the event object of the browser.
-
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorkeypress", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ keypress: function (evt, ui) { ... } });
-
keyup
Inherited- Cancellable:
- false
Fired on keyup event.
-
evtType: Event
JQuery event object. Use evt.originalEvent to obtain reference to event of the browser.
-
uiType: Object
-
ownerType: Object
Gets a reference to the editor.
-
elementType: Object
Gets a reference to the event target.
-
editorInputType: Object
Gets a reference to the editor input field.
-
keyType: Object
Gets the value of the keyCode.
-
originalEventType: Object
Gets a reference to the event object of the browser.
-
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorkeyup", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ keyup: function (evt, ui) { ... } });
-
mousedown
Inherited- Cancellable:
- true
Fired on mousedown event.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditormousedown", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ mousedown: function (evt, ui) { ... } });
-
mousemove
Inherited- Cancellable:
- false
Fired on mousemove at any part of editor including the drop-down list.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditormousemove", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ mousemove: function (evt, ui) { ... } });
-
mouseout
Inherited- Cancellable:
- false
Fired on mouseleave at any part of editor including the drop-down list.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditormouseout", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ mouseout: function (evt, ui) { ... } });
-
mouseover
Inherited- Cancellable:
- false
Fired on mouseover at any part of editor including the drop-down list.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditormouseover", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ mouseover: function (evt, ui) { ... } });
-
mouseup
Inherited- Cancellable:
- false
Fired on mouseup event.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditormouseup", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ mouseup: function (evt, ui) { ... } });
-
rendered
Inherited- Cancellable:
- false
Fired after rendering of the editor has finished.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorrendered", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ rendered: function (evt, ui) { ... } });
-
rendering
Inherited- Cancellable:
- true
Fired before rendering of the editor has finished.
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorrendering", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ rendering: function (evt, ui) { ... } });
-
textChanged
Inherited- Cancellable:
- false
Fired after the editor's text has been changed. It can be raised when keyUp event occurs,
when the clear button is clicked or when an item from a list is selected.Code Sample
//Bind after initialization $(".selector").on("ignumericeditortextchanged", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ textChanged: function (evt, ui) { ... } });
-
valueChanged
Inherited- Cancellable:
- false
Fired after the editor value is changed. It can be raised after loosing focus or on spin events.
-
evtType: Event
JQuery event object.
-
uiType: Object
-
ownerType: Object
Gets a reference to the editor.
-
editorInputType: Object
Gets the editor input.
-
newValueType: Object
Gets the value entered from the user after internal formatting. The argument type might differ depending on the editor type.
-
originalValueType: Object
Gets the value entered from the user before internal formatting. The argument type might differ depending on the editor type.
-
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorvaluechanged", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ valueChanged: function (evt, ui) { ... } });
-
valueChanging
Inherited- Cancellable:
- true
Fired before changing the editor's value.
Return false in order to cancel change.
It can be raised after loosing focus or on spin events.-
evtType: Event
JQuery event object.
-
uiType: Object
-
ownerType: Object
Gets a reference to the editor.
-
editorInputType: Object
Gets the editor input.
-
newValueType: Object
Gets the editor's new value. The argument type might differ depending on the editor type.
-
oldValueType: Object
Gets the editor's old value. The argument type might differ depending on the editor type.
-
Code Sample
//Bind after initialization $(".selector").on("ignumericeditorvaluechanging", function (evt, ui) { ... }); //Initialize $(".selector").igNumericEditor({ valueChanging: function (evt, ui) { ... } });
-
changeGlobalLanguage
Inherited- .igNumericEditor( "changeGlobalLanguage" );
Changes the widget language to global language. Global language is the value in $.ig.util.language.
Code Sample
$(".selector").igNumericEditor("changeGlobalLanguage");
-
changeGlobalRegional
Inherited- .igNumericEditor( "changeGlobalRegional" );
Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional.
Code Sample
$(".selector").igNumericEditor("changeGlobalRegional");
-
changeLocale
Inherited- .igNumericEditor( "changeLocale" );
Changes the all locales into the widget element to the language specified in options.language
Note that this method is for rare scenarios, see language or locale option setter.Code Sample
$(".selector").igNumericEditor("changeLocale");
-
changeRegional
- .igNumericEditor( "changeRegional" );
Changes the the regional settings of widget element to the language specified in options.regional
Note that this method is for rare scenarios, use regional option setter.Code Sample
$(".selector").igNumericEditor("changeRegional");
-
clearButton
Inherited- .igNumericEditor( "clearButton" );
- Return Type:
- jquery
- Return Type Description:
- Returns a reference to the jquery object.
Returns a reference to the clear button UI element of the editor.
Code Sample
var button = $(".selector").igNumericEditor("clearButton");
-
destroy
Inherited- .igNumericEditor( "destroy" );
Destroys the widget.
Code Sample
$(".selector").igNumericEditor("destroy");
-
displayValue
Inherited- .igNumericEditor( "displayValue" );
- Return Type:
- string
- Return Type Description:
- Visible text of the editor.
Gets the visible text in the editor.
Code Sample
$(".selector").igNumericEditor("displayValue");
-
dropDownButton
Inherited- .igNumericEditor( "dropDownButton" );
- Return Type:
- jquery
- Return Type Description:
- Returns reference to jquery object.
Returns a reference to the drop-down button UI element of the editor.
Code Sample
var button = $(".selector").igNumericEditor("dropDownButton");
-
dropDownContainer
Inherited- .igNumericEditor( "dropDownContainer" );
- Return Type:
- jquery
- Return Type Description:
- Returns reference to jquery object.
Gets reference to jquery object which is used as container of drop-down list.
Code Sample
$(".selector").igNumericEditor("dropDownContainer");
-
dropDownVisible
Inherited- .igNumericEditor( "dropDownVisible" );
- Return Type:
- bool
- Return Type Description:
- The visibility state of the drop down.
Returns if the drop-down list is visible.
Code Sample
var visible = $(".selector").igNumericEditor("dropDownVisible");
-
editorContainer
Inherited- .igNumericEditor( "editorContainer" );
- Return Type:
- jquery
- Return Type Description:
- The container editor element.
Gets a reference to the jQuery element that wraps the editor.
Code Sample
$(".selector").igNumericEditor("editorContainer");
-
field
Inherited- .igNumericEditor( "field" );
- Return Type:
- jquery
- Return Type Description:
- The visual editor element.
Gets the input element of the editor.
Code Sample
$(".selector").igNumericEditor("field");
-
findListItemIndex
- .igNumericEditor( "findListItemIndex", number:number );
- Return Type:
- number
- Return Type Description:
- Returns index of the found item.
Finds index of list item by text that matches with the search parameters.
- number
- Type:number
- The text to search for.
Code Sample
$(".selector").igNumericEditor("findListItemIndex");
-
getRegionalOption
- .igNumericEditor( "getRegionalOption" );
- Return Type:
- string
- Return Type Description:
- Current regional.
Gets current regional.
Code Sample
$(".selector").igNumericEditor("getRegionalOption");
-
getSelectedListItem
Inherited- .igNumericEditor( "getSelectedListItem" );
- Return Type:
- jquery
- Return Type Description:
- Selected list item.
Gets the selected list item.
Code Sample
var selectedItem = $(".selector").igNumericEditor("getSelectedListItem");
-
hasFocus
Inherited- .igNumericEditor( "hasFocus" );
- Return Type:
- bool
- Return Type Description:
- Returns if the editor is focused or not.
Gets whether the editor has focus.
Code Sample
$(".selector").igNumericEditor("hasFocus");
-
hide
Inherited- .igNumericEditor( "hide" );
Hides the editor.
Code Sample
$(".selector").igNumericEditor("hide");
-
hideDropDown
Inherited- .igNumericEditor( "hideDropDown" );
Hides the drop down list.
Code Sample
$(".selector").igNumericEditor("hideDropDown");
-
inputName
Inherited- .igNumericEditor( "inputName", [newValue:string] );
- Return Type:
- string
- Return Type Description:
- Current input name.
Gets/Sets name attribute applied to the editor element.
- newValue
- Type:string
- Optional
- The new input name.
Code Sample
$(".selector").igNumericEditor("inputName", "checkbox");
-
insert
Inherited- .igNumericEditor( "insert", string:string );
Inserts the text at the location of the caret or over the current selection. If the editor is focused the method will insert the text over the current selection. If the editor is not focused the method will set the text as value of the editor.
Note: The method raises textChanged event.- string
- Type:string
- The string to be inserted.
Code Sample
$('.selector').igNumericEditor({ blur: function (evt, ui) { // insert 0 as the user leaves the field ui.owner.insert("0"); } }); $(".selector").igNumericEditor("insert", "20");
-
isValid
Inherited- .igNumericEditor( "isValid" );
- Return Type:
- bool
- Return Type Description:
- Whether editor value is valid or not.
Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications.
Code Sample
var isValid = $(".selector").igNumericEditor("isValid");
-
select
Inherited- .igNumericEditor( "select", start:number, end:number );
Selects the text between start and end indices in the editor. If the parameters are equal, then the method sets location of caret. The method has effect only when the editor has focus.
- start
- Type:number
- Start of the selection.
- end
- Type:number
- End of the selection.
Code Sample
$(".selector").igNumericEditor("select", 2, 4);
-
selectedListIndex
Inherited- .igNumericEditor( "selectedListIndex", [index:number] );
- Return Type:
- number
- Return Type Description:
- Returns the selected index.
Gets the index of the selected list item. Sets selected item by index.
- index
- Type:number
- Optional
- The index of the item that needs to be selected.
Code Sample
$(".selector").igNumericEditor("selectedListIndex", 1); var selectedIndex = $(".selector").igNumericEditor("selectedListIndex");
-
selectListIndexDown
Deprecated- .igNumericEditor( "selectListIndexDown" );
This method is deprecated in favor of spinDown.
Code Sample
$(".selector").igNumericEditor("selectListIndexDown");
-
selectListIndexUp
Deprecated- .igNumericEditor( "selectListIndexUp" );
This method is deprecated in favor of spinUp.
Code Sample
$(".selector").igNumericEditor("selectListIndexUp");
-
setFocus
Inherited- .igNumericEditor( "setFocus", [delay:number] );
Sets focus to the editor after the specified delay.
- delay
- Type:number
- Optional
- The delay before focusing the editor.
Code Sample
$(".selector").igNumericEditor("setFocus", 200);
-
show
Inherited- .igNumericEditor( "show" );
Shows the editor.
Code Sample
$(".selector").igNumericEditor(("show");
-
showDropDown
Inherited- .igNumericEditor( "showDropDown" );
Shows the drop down list.
Code Sample
$(".selector").igNumericEditor("showDropDown");
-
spinDown
- .igNumericEditor( "spinDown", [delta:number] );
Decrements value in editor according to the parameter selects the next item from the drop-down list if isLimitedToListValues is enabled.
- delta
- Type:number
- Optional
- Decrement value.
Code Sample
$(".selector").igNumericEditor("spinDown");
-
spinDownButton
Inherited- .igNumericEditor( "spinDownButton" );
- Return Type:
- jquery
- Return Type Description:
- The jQuery object representing the spin down UI element of the editor.
Returns a reference to the spin down UI element of the editor.
Code Sample
var button = $(".selector").igNumericEditor("spinDownButton");
-
spinUp
- .igNumericEditor( "spinUp", [delta:number] );
Increments value in editor according to the parameter or selects the previous item from the drop-down list if isLimitedToListValues is enabled.
- delta
- Type:number
- Optional
- Increments value.
Code Sample
$(".selector").igNumericEditor("spinUp");
-
spinUpButton
Inherited- .igNumericEditor( "spinUpButton" );
- Return Type:
- jquery
- Return Type Description:
- The jQuery object representing the spin up UI element of the editor.
Returns a reference to the spin up UI element of the editor.
Code Sample
var button = $(".selector").igNumericEditor("spinUpButton");
-
validate
Inherited- .igNumericEditor( "validate" );
- Return Type:
- bool
- Return Type Description:
- Whether editor value is valid or not.
Triggers validation for the editor. If validatorOptions are set will also call validate on the igValidator.
Code Sample
var valid = $(".selector").igNumericEditor("validate");
-
validator
Inherited- .igNumericEditor( "validator" );
- Return Type:
- object
- Return Type Description:
- Returns reference to igValidator or null.
Gets a reference to igValidator used by the editor.
Code Sample
var validator = $(".selector").igNumericEditor("validator");
-
value
- .igNumericEditor( "value", [newValue:number] );
- Return Type:
- number
- Return Type Description:
- Current editor value.
Gets/Sets editor value.
- newValue
- Type:number
- Optional
- New editor value.
Code Sample
$(".selector").igNumericEditor("value", 25);
-
ui-state-active
- Class applied to the top element when editor is active. Default value is 'ui-state-active'.
-
ui-igedit-button-common ui-unselectable
- Class applied commonly to all the button containers, Default value is 'ui-igedit-button-common ui-unselectable ui-igedit-button-ltr ui-state-default'.
-
ui-igedit-buttonhover ui-state-hover
- Classes applied to the SPAN element of button in mouse-over state. Default value is 'ui-igedit-buttonhover ui-state-hover'.
-
ui-igedit-buttonpressed ui-state-highlight
- Classes applied to the SPAN element of button in pressed state. Default value is 'ui-igedit-buttonpressed ui-state-highlight'.
-
ui-igedit-cleararea ui-state-default
- Class applied to the div holding the clear button. Default value is 'ui-igedit-cleararea ui-state-default'.
-
ui-igedit-buttonimage ui-icon-circle-close
- Class applied to the div holding the clear button image. Default value is 'ui-igedit-buttonimage ui-icon-circle-close ui-icon ui-igedit-buttondefault'.
-
ui-igedit ui-igedit-container ui-widget ui-corner-all ui-state-default
- Class applied to the top element when editor is rendered in container. Default value is 'ui-igedit ui-igedit-container ui-widget ui-corner-all ui-state-default'.
-
ui-state-disabled
- Classes applied to the editing element in disabled state. Default value is 'ui-igedit-disabled ui-state-disabled'.
-
ui-igedit-dropdown-button
- Class applied to the div holding the drop down button. Default value is 'ui-igedit-dropdown-button'.
-
ui-icon ui-icon-triangle-1-s ui-igedit-buttonimage
- Class applied to the div holding the drop down button image. Default value is 'ui-icon ui-icon-carat-1-s ui-igedit-buttonimage'.
-
ui-igedit-dropdown ui-widget
- Class applied to the container holding the listitems. Default value is 'ui-igedit-dropdown'.
-
ui-igedit-input
- Class applied to the main/top element. Default value is 'ui-igedit-input'.
-
ui-igeditor-input-container ui-corner-all
- Class applied to the div which wraps the editable input (in case of multiline textarea). Default value is "ui-igeditor-input-container ui-corner-all".
-
ui-state-focus
- Class applied to the top element when editor is on focus. Default value is 'ui-state-focus'.
-
ui-state-hover
- Class applied to the top element when editor is hovered. Default value is 'ui-state-hover'.
-
ui-igedit-listitem ui-state-default
- Class applied to the SPAN element which represents item in dropdown list. Default value is 'ui-igedit-listitem ui-state-default'.
-
ui-state-active ui-igedit-listitemactive
- Class applied to the Class applied to the SPAN element which represents active item in dropdown list. Default value is 'ui-igedit-listitemselected ui-state-highlight'.
-
ui-igedit-listitemhover ui-state-hover
- Class applied to the Class applied to the SPAN element which represents item in dropdown list with mouse-over state. Default value is 'ui-igedit-listitemhover ui-state-hover'.
-
ui-igedit-listitemselected ui-state-highlight
- Class applied to the Class applied to the SPAN element which represents selected item in dropdown list. Default value is 'ui-igedit-listitemselected ui-state-highlight'.
-
ui-igedit-negative
- Class applied to the editing element of numeric editor when value is negative. The class is applied only when the editor is in display mode (no focus). Default value is 'ui-igedit-negative'.
-
ui-igedit-placeholder
- Class applied to the visible input in case of plaseHolder option set. This class is related only to the placeHolder styling. Default value is 'ui-igedit-placeholder'.
-
ui-igedit-spinlowerimage ui-icon-carat-1-s ui-icon
- Class applied to the div holding the spin down button image. Default value is 'ui-igedit-spinlowerimage ui-icon-carat-1-s ui-icon ui-igedit-buttondefault ui-igedit-spinbutton ui-igedit-buttonimage'.
-
ui-igedit-spinupperimage ui-icon-carat-1-n ui-icon
- Class applied to the div holding the spin up button image. Default value is "ui-igedit-spinupperimage ui-icon-carat-1-n ui-icon ui-igedit-buttondefault ui-igedit-spinbutton ui-igedit-buttonimage'.
-
ui-igedit-textarea
- Class applied to the visible textarea element in case of textMode set to 'multiline'.