setCellEditor

creates an editor in a cell

void setCellEditor(number rowId,number columnId,object editorObject, [string page] );
rowIdnumberthe row id
columnIdnumberthe column id
editorObjectobjectan object with editor type and options (for richselect)
pagestringoptional, the name of the sheet

Example

$$("ss1").setCellEditor(8, 1, { 
    editor: "ss_richselect", 
    options: ["One", "Two", "Three"] 
   }, "Sheet1");
 
// or
$$("ss1").setCellEditor(8, 2, { 
    editor:"ss_richselect", 
    options:"B3:B7", 
    empty:true 
   }, "Sheet1");

Related samples

Details

The editorObject parameter can have the following properties:

  • editor - (string) the editor type (ss_richselect or excel_date)
  • options - (string,array) a range of cell references or an array of editor options
  • empty - (boolean) specifies whether to add an empty option

You can pass null as the editorObject parameter. In this case the editor will be removed from the cell.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix popular javascript framework and page of javascript spreadshee product.