editNext

closes the current editor and opens one in the next editable cell

void editNext( [boolean next,object from] );
nextbooleanoptional, the direction of moving to the next editor; true (default) - forward, false - backward (details below)
fromobjectoptional, the cell relative to which the next editable cell is searched for (details below)

Example

$$("mygrid").editNext();

Details

Note that the method will work only with the enabled editable parameter:

webix.ui({
    view:"datatable",
    editable:true
});

The method takes two optional parameters:

  • next - (boolean) defines the direction in which the editor moves:
    • true (default) - the editor moves forward: in DataTable and TreeTable, to the next cell on the right and then to the next row; in other components, to the next item;
    • false - the editor moves backward: in DataTable and TreeTable, to the cell on the left and then to the previous row; in other components, to the previous item.
  • from - (object) the cell or item relative to which the next editable cell is searched for:
    • in DataTable and TreeTable, the object contains 2 attributes:
      • row - (string|number) the row id;
      • column - (string) the column id;
    • in other components (e.g. Property), the object contains the id attribute with the item id.
// open the editor in the previous editable cell
$$("mygrid").editNext(false);
 
// open the editor in the next editable cell after the specified one
$$("mygrid").editNext(true, { row:10, column:"price" });

The cell specified in the from parameter is not opened for editing; the search starts from the cell next to it.

Note that if an editor is already open, the search starts from the cell of this editor and the from parameter is ignored.

If editing of the found cell is cancelled (e.g. the onBeforeEditStart event handler returns false), the method moves on to the next editable cell.

See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.