83 lines
No EOL
5 KiB
HTML
83 lines
No EOL
5 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>YAHOO.ext.grid.NumberEditor</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools"><img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="YAHOO.ext.grid.NumberEditor.html" target="_blank">Print Friendly</a></div>
|
|
<h1>Class YAHOO.ext.grid.NumberEditor</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>YAHOO.ext.grid</td></tr>
|
|
<tr><td class="label">Class:</td><td>NumberEditor</td></tr>
|
|
<tr><td class="label">Extends:</td><td><a href="YAHOO.ext.grid.CellEditor.html">CellEditor</a></td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="NumberEditor.js.html">NumberEditor.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Provides a masked editor for numeric values. Invalid keys are ignored. It supports the following configuration options:
|
|
<ul class="list">
|
|
<li><i>allowDecimals</i> - True if the cell can have decimal values.</li>
|
|
<li><i>decimalSeparator</i> - Character(s) to allow as the decimal separator.</li>
|
|
<li><i>decimalPrecision</i> - Set the maximum decimal precision.</li>
|
|
<li><i>decimalPrecisionFcn</i> - Define the function to call to remove extra precision (ie. Math.floor, Math.round, Math.ceil or your own function).</li>
|
|
<li><i>allowNegative</i> - True if the cell allows negative values.</li>
|
|
<li><i>selectOnFocus</i> - True to select the text when the editor is activated.</li>
|
|
<li><i>minValue</i> - The minimum value the cell will allow.</li>
|
|
<li><i>maxValue</i> - The maximum value the cell will allow.</li>
|
|
<li><i>minText</i> - The tooltip to display when the value in the cell is below the minimum.</li>
|
|
<li><i>maxText</i> - The tooltip to display when the value in the cell is above the maximum.</li>
|
|
<li><i>nanText</i> - The tooltip to display when the value in the cell is not a valid number (for example, negatives are allowed and the value in the cell is just "-" with no numbers).</li>
|
|
<li><i>allowBlank</i> - True if the cell is allowed to be empty.</li>
|
|
<li><i>blankText</i> - The tooltip (error message) to display when the cell is empty and is not allowed to be.</li>
|
|
<li><i>validator</i> - Any custom validation function you want called. The function must return true if the data is valid or an error message otherwise.</li>
|
|
<li><i>validationDelay</i> - The delay in milliseconds for validation. Each time the user types something the field is validated after a specified delay, setting this value allows you to customize that delay (for example, if your custom validation routine is slow).</li>
|
|
</ul>
|
|
For more information on using this editor, see <a href="http://www.jackslocum.com/yui/2006/09/10/adding-built-in-editing-support-to-the-yahoo-ui-extensions-grid/">this blog post</a>. </div>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<div class="no-members">This class has no public properties.</div> <a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#NumberEditor">NumberEditor</a>(<code>Object config</code>)</td>
|
|
<td class="msource" rowspan="2">NumberEditor</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Create a new NumberEditor</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<div class="no-members">This class has no public events.</div>
|
|
|
|
<a name="NumberEditor"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>NumberEditor</i></h3>
|
|
<code>public function NumberEditor(<code>Object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Create a new NumberEditor <div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>config</code> : Object<div class="sub-desc"></div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
Copyright © 2006 Jack Slocum. All rights reserved.
|
|
</body>
|
|
</html>
|
|
|