Zebra API Doc

zebra.ui.grid.DefEditors Class

Simple grid cells editors provider implementation. By default the editors provider uses a text field component as a cell content editor. It is possible to customize a grid column editor by specifying it via "editors[col]" property value

Constructor

zebra.ui.grid.DefEditors

()

Methods

fetchEditedValue

(
  • grid
  • row
  • col
  • data
  • editor
)
Object

Fetch an edited value from the given UI editor component.

Parameters:

  • grid zebra.ui.grid.Grid

    a target grid component

  • row Integer

    a grid cell row that has been edited

  • col Integer

    a grid cell column that has been edited

  • data Object

    an original cell content

  • editor zebra.ui.Panel

    an editor that has been used to edit the given cell


Return: Object

a value that can be applied as a new content of the edited cell content

getEditor

(
  • grid
  • row
  • col
  • v
)
zebra.ui.Panel

Get an editor UI component to be used for the given cell of the specified grid

Parameters:

  • grid zebra.ui.grid.Grid

    a grid whose cell is going to be edited

  • row Integer

    a grid cell row

  • col Integer

    a grid cell column

  • v Object

    a grid cell model data


Return: zebra.ui.Panel

an editor UI component to be used to edit the given cell

shouldCancel

(
  • grid
  • row
  • col
  • e
)
Boolean

Test if the specified input event has to canceling the given grid cell editing

Parameters:


Return: Boolean

true if the given input event triggers the given cell editing cancellation

shouldFinish

(
  • grid
  • row
  • col
  • e
)
Boolean

Test if the specified input event has to trigger finishing the given grid cell editing

Parameters:


Return: Boolean

true if the given input event triggers finishing the given cell editing

shouldStart

(
  • grid
  • row
  • col
  • e
)
Boolean

Test if the specified input event has to trigger the given grid cell editing

Parameters:


Return: Boolean

true if the given input event triggers the given cell editing