1. Add Hook method for Handsontable Addhook (key,callback): Key is the hook method name
[JavaScript]View Plaincopyprint?
- <span style="FONT-SIZE:18PX;" > Example: Hot.addhook (' beforeinit ', mycallback);</span>
Addhookonce (key,callback): Add a one-time only method, automatically delete after use
[JavaScript]View Plaincopyprint?
- <span style="FONT-SIZE:18PX;" > Example: Hot.addhookonce (' beforeinit ', mycallback);</span>
2. Add a row or column to delete a row or column alter (action,index,amount,source,keepemptyrows) Action: 4 Values Insert_row,insert_col,remove_row,remove _colindex: Row index, inserted or deleted at index when present, not present when inserting amount after current line: Default is 1source: Row or Column object Keepemptyrows:true/false, null row is not deleted when value is true. 3.clear (): Empty table Data 4.colOffset (): Gets the index value of the first column visible 5.colToProp (COL): Returns the column name for the given index column, col is the column index 6.countCols (): Counts the total number of columns in the table and returns CountRows (): The total number of rows in the statistics table, and returns
7.countEmptyCols (Ending): When the value of ending is true, the total number of all empty columns is counted, and the total number returned displays the rightmost
Countemptyrows (Ending): When the value of ending is 1 o'clock, the total number of empty rows is counted, the total number of returns is displayed at the bottom
8.countRenderedCols (): Counts and returns the number of rendered columns
Countrenderedrows (): Counts and returns the number of rows rendered
9.countVisibleCols (): Counts and returns the number of visible columns, and when 1 is returned, the table is not visible
Countvisiblerows (): Counts and returns the number of rows visible, and when 1 is returned, the table is not visible
10.deselectCell (): Cancels the currently selected cell
11.destory (): Remove table from DOM object
12.destoryEditor (reveroriginal)
Removes the current editor and selects the current cell, rendering the effect on. If reveroriginal is not true then the edited data will be saved, and if true, the previous data will be restored without saving the new data to the cell.
13.getActiveEditor (): Returns an active Edit object.
14.getCell (Row.col,topmost): Gets a rendered cell based on the row and column index, and returns NULL if the cell is not rendered
Where Row,col are row and column indexes, topmost to indicate whether it is the topmost, with a value of True/false
15.getCellEditor (): Get the editor for a cell
16.getCellMeta (Row,col): Gets the cell's Property object based on the row and column index
17.getCellRenderer (Row,col): Gets the cell's render function based on the cell's Row and column index
18.getCellValidator (): Gets the validator for the cell
19.getColHeader (COL): Gets the column header name based on the column index
Getrowheader (Row): Get the name of a wardrobe based on the row index
20.getColWidth (COL): Get column widths based on column index
GetRowHeight (Row): Get row height based on row index
21.getCoords (Elem): Gets the coordinates of an element
22.getCopyableData (Startrow,startcol,endrow,endcol): Gets the cell data for the specified range
23.getData (row1,col1,row2,col2): Gets the data for the specified range of cells
24.getDataAtCell (Row,col): Gets the value of a cell based on a row and column index
25.getDataAtCol (COL): Gets a column of data based on the column index
Getdataatrow (Row): Gets a row of data based on the row index
26.getDataAtProp (prop): Gets the data for the corresponding column based on the object property name, prop the property name
27.getDataAtRowProp (Row,prop): Returns the value of the specified property name based on the row index
28.getInstance (): Get a Handsontable instance
29.getPlugin (pluginname): Get a plugin instance based on the plugin name
30.getSelected (): Gets the indexed array of selected cells, including: STARTROW,STRATCOL,ENDROW,ENDCOL4 values.
31.getSelectedRange (): Gets the coordinates of the selected cell
32.getSettings (): Gets the configuration information for the object
33.getSourceDataAtCol (COL): Gets the column data from a data source based on the column number
Getsourcedataatrow (ROW): Gets the row data from a data source based on the line number
34.getValue (): Gets the value of all selected cells
35.hasColHeaders (): Returns whether a column header exists
Hasrowheaders (): Returns the presence of a wardrobe
36.isEmptyCol (COL): Determines whether the column is empty based on the column index
Isemptyrow (Row): Determines whether the row is empty based on the row index
37.isListening (): Determines whether the current handsontable instance is being monitored
Listen (): Listen to the input box in body
Unlisten (): Stop monitoring
38.loadData (data): Load Local Data
39.populateFormArray (Start,input,end,source,method,direction,deltas): Populating cells with two-dimensional arrays
Wherein, start: Start position
Input: two-dimensional array
End: Ending position
Source: Default is Populatefromarray
Method: Default is Overwrite
Direction:left/right/top/bottom
Deltas: Its value is an array
Populateformarray (Row,col,input,endrow,,endcol,source,method,direction,deltas)
40.propToCol (prop): Returns the column index for the given property name, prop as the property name
Proptorow (prop): Returns the row index for the given property name, prop as the property name
41.removeCellMeta (Row,col,key): Removes the specified Property object based on the row and column index
42.removeHook (key,callback): Remove Hook method
43.render (): Render table
44.rowOffset (): Gets the index of the first visible row
45.setCellMeta (row,col,key,val): Set parameter properties and values to cells of a specified row and column
46.setCellMetaObject (Row,col,prop): Sets the Property object to the specified cell
47.setDataAtCell (Row,col,value,source): Set a new value to a cell
48.setDataAtRowProp (Row,prop,value,source): Sets the property value of the specified row to the specified value
49.updateSettings (Setting,init): Modify the Initialized configuration information
50.validdateCells (callback): Validate all cells with authenticator
Handsontable Cell Manipulation methods