Print Friendly

# Class YAHOO.ext.grid.SelectEditor

Package: | YAHOO.ext.grid
Class: | SelectEditor
Extends: | CellEditor
Defined In: | SelectEditor.js

Creates an editor out of an existing select field. You can create the select element through DOM in Javascript and pass it to the SelectEditor's constructor or an easier way is like this:
Define the select field in your document, giving it the ygrid-editor class.

    <select id="light" class="ygrid-editor">
    	<option value="Shade">Shade</option>
    	<option value="Mostly Shady">Mostly Shady</option>
    	<option value="Sun or Shade">Sun or Shade</option>
    	<option value="Mostly Sunny">Mostly Sunny</option>
    	<option value="Sunny">Sunny</option>
    </select>

Create the SelectEditor object, passing in the id of your select field.

    var editor = new YAHOO.ext.grid.SelectEditor('light');

For more information on using this editor, see this blog post.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| SelectEditor(`HTMLElement/String element`) | SelectEditor
Create a new SelectEditor

## Public Events

This class has no public events.

## Constructor Details

### SelectEditor

`public function SelectEditor(`HTMLElement/String element`)`
Create a new SelectEditor
Parameters:

- `element` : HTMLElement/String

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.