UI Plugin

DataTable: inline cell editing

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None

Description

Have not even looked into it, maybe already possible?

Issue Links

Activity

Hide
Matthew Taylor added a comment -

In order to do the inline cell editing properly, I'll need to have proper cell formats first. Otherwise it will always be a text editor.

Show
Matthew Taylor added a comment - In order to do the inline cell editing properly, I'll need to have proper cell formats first. Otherwise it will always be a text editor.
Hide
Matthew Taylor added a comment -

Planning on implementing this is some form of ajax call on cell blur.

Show
Matthew Taylor added a comment - Planning on implementing this is some form of ajax call on cell blur.
Hide
Matthew Taylor added a comment - - edited

I got a cell editor working for text-formatted cells. It makes an ajax call on save to a specified url. All the config is within columnDefs:

columnDefs="[
    [key:'name', formatter:'text',
        editor:[type:'text', controller:'demo', action:'tableChange', config:[disableBtns:true]],
        sortable:true, resizeable: true, label:'Name']
]"

The 'config' will be passed through to the BaseCellEditor that is constructed. The following data is passed to the URL provided in POST: id, field, newValue.

TODO:

  • Allow loading dialog show during call
  • Revert cell value on failure and alert user of problem
  • dates, drop down selections, radio, checkbox
  • validations (already supported through YUI easily)
  • make editors available through GRAILSUI namespace for further customizations (they are already available through dataTable.getColumn().editor
  • if there is no 'type' value for an editor, assume the formatter type (throw exception if missing both)
Show
Matthew Taylor added a comment - - edited I got a cell editor working for text-formatted cells. It makes an ajax call on save to a specified url. All the config is within columnDefs:
columnDefs="[
    [key:'name', formatter:'text',
        editor:[type:'text', controller:'demo', action:'tableChange', config:[disableBtns:true]],
        sortable:true, resizeable: true, label:'Name']
]"
The 'config' will be passed through to the BaseCellEditor that is constructed. The following data is passed to the URL provided in POST: id, field, newValue. TODO:
  • Allow loading dialog show during call
  • Revert cell value on failure and alert user of problem
  • dates, drop down selections, radio, checkbox
  • validations (already supported through YUI easily)
  • make editors available through GRAILSUI namespace for further customizations (they are already available through dataTable.getColumn().editor
  • if there is no 'type' value for an editor, assume the formatter type (throw exception if missing both)

People

Vote (6)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: