inputEx Documentation Back to homepage

### inputEx Documentation > inputEx.widget.DataTable 0.2.2

## Static Class inputEx.widget.DataTable

Create an editable datatable

### Constructor

inputEx.widget.DataTable `( options )`

Parameters:
  `options <Object>` - Options:
  - id
  - parentEl
  - editing 'formeditor' (default) or 'celleditor'
  - tableColumns: (optional) list of visible columns in the datatable
  - sortable: (optional) are the columns sortable, default true
  - resizeable: (optional) are the columns resizeable, default true
  - allowInsert: default true
  - allowModify: default true
  - allowDelete: default true

### Methods

#### deplaceSubForm

`deplaceSubForm(rowIndex)`
Deplace the form
Parameters:

`rowIndex`

#### fieldsToColumndefs

`fieldsToColumndefs(fields)`
Convert an inputEx fields definition to a DataTable columns definition
Parameters:

`fields`

#### fieldToColumndef

`fieldToColumndef(field)`
Convert a single inputEx field definition to a DataTable column definition
Parameters:

`field`

#### hideSubform

`hideSubform()`
Hide the form

#### initCellEditor

`initCellEditor()`
Make the datatable inplace editable with inputEx fields If this.options.editing == "celleditor"

#### initFormEditor

`initFormEditor()`
Create an inputEx form next to the datatable. If this.options.editing == "formeditor"

#### itemAddedEvt

`itemAddedEvt(Added)`
YAHOO custom event fired when an item is added
Parameters:

`Added <YAHOO.widget.Record>` - record

#### itemModifiedEvt

`itemModifiedEvt(Modified)`
YAHOO custom event fired when an item is modified
Parameters:

`Modified <YAHOO.widget.Record>` - record

#### itemRemovedEvt

`itemRemovedEvt(Removed)`
YAHOO custom event fired when an item is removed
Parameters:

`Removed <YAHOO.widget.Record>` - record

#### onCancelForm

`onCancelForm(e)`
Cancel row edition
Parameters:

`e`

#### onCellClick

`onCellClick(ev,args)`
Handling cell click events
Parameters:

`ev`

`args`

#### onEventSelectRow

`onEventSelectRow(args)`
Set the subForm value when a row is selected
Parameters:

`args`

#### onInsertButton

`onInsertButton(e)`
Insert button event handler
Parameters:

`e`

#### onSaveForm

`onSaveForm(e)`
Save the form value in the dataset
Parameters:

`e`

#### removeUnsavedRecord

`removeUnsavedRecord()`
Remove the record that has not been saved

#### renderDatatable

`renderDatatable()`
Render the datatable

#### showSubform

`showSubform(rowIndex)`
Show the form
Parameters:

`rowIndex`

Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:32 GMT using neyricjslibs-template.