Methods

add - add(record, [first])
Adds a record or records to the grid.
addColumn - addColumn([before], column)
Adds a column or columns to the grid.
addRange - addRange(range)
Adds a visible range or ranges to the grid.
addSearch - addSearch([before], search)
Adds a search or searches to the grid.
clear - clear([noRefresh])
Removes all records from the grid.
click - click(recid, [event])
Called when user clicks on a record.
clipboardCopy - clipboardCopy(ind, col_ind)
Copies the content of a cell to the clipboard.
collapse - collapse(recid)
Called when user clicks on the collapse record icon.
columnClick - columnClick(field, [event])
Called when user clicks on the column.
columnDblClick - columnDblClick(field, [event])
Called when user double clicks on the column.
columnOnOff - columnOnOff(el, event, field, value)
Called when user opens grid settings (on grids toolbar) and selects an item.
contextMenu - contextMenu(recid, [event])
Displays context menu under specified record.
copy - copy()
Returns selected records in tab-delimited text format.
dblClick - dblClick(recid, [event])
Called when user double clicks on a record.
delete - delete(force)
Called when user deletes record(s).
editField - editField(recid, column, [value], [event])
Enters edit mode for the specified record and field.
error - error(msg)
Display error message dialog.
expand - expand(recid)
Called when user clicks on the expand record icon.
find - find(match, [returnIndex])
Finds and returns matched records.
get - get(recid, [returnIndex])
Finds the record and returns its object or index in records array.
getCellHTML - getCellHTML(index, column_index, [summary])
Returns final HTML for the cell.
getCellValue - getCellValue(index, column_index, [summary])
Returns parse value for the cell.
getChanges - getChanges([recordsBase])
Returns array of changed record objects.
getColumn - getColumn([field], [returnIndex])
Finds the column and returns its object or index in columns array.
getColumnsHTML - getColumnsHTML()
Returns HTML of grid columns.
getFirst - getFirst([index])
Returns first record displayed in the grid
getFooterHTML - getFooterHTML()
Returns HTML for grid footer.
getOperators - getOperators(fieldType, fieldOpers)
Returns the content of a cell.
getRangeData - getRangeData(range, [extra])
Returns range data defined to the given range object.
getRecordHTML - getRecordHTML(index, line_number, [summary])
Returns final HTML for a record.
getRecordsHTML - getRecordsHTML()
Returns HTML of grid records in the scroll view.
getSearch - getSearch([field], [returnIndex])
Finds the search and returns its object or index in searches array.
getSearchData - getSearchData(field)
Returns applied search object for specified field.
getSearchesHTML - getSearchesHTML()
Returns HTML of search fields.
getSelection - getSelection(returnIndex)
Returns current grid selection.
getSummaryHTML - getSummaryHTML()
Returns HTML of summary records.
hideColumn - hideColumn(field, [field], ...)
Hides a column or columns.
hideSearch - hideSearch(field, [field], ...)
Hides a search or searches.
initAllField - initAllField(field, [value])
Initializes global search field.
initColumnOnOff - initColumnOnOff()
Refreshes toolbar button that allows to show/hide columns.
initOperator - initOperator(el, search_ind)
Initializes operator for the search field.
initResize - initResize()
Initializes column resize elements.
initSearches - initSearches()
Initializes search fields when user opens advanced search overlay.
initToolbar - initToolbar()
Creates w2toolbar object based on grid.toolbar definition.
keydown - keydown(event)
Processes keydown events.
load - load(url, [callBack])
Loads records from specified url.
localSearch - localSearch([silent])
Performs search on local data set.
localSort - localSort([silent], [noResetRefresh])
Performs sort on local data set.
lock - lock(message, [showSpinner])
Locks the grid.
menuClick - menuClick(recid, event)
Called when user clicks on a context menu item.
mergeChanges - mergeChanges()
Merges user changes into the records array.
message - message(options, [callback])
Shows a context message for the grid
nextCell - nextCell(col_ind, editable)
Returns next cell or null if it is last cell in the row.
nextRow - nextRow(index)
Returns next row or null if it is the last row.
parseField - parseField(obj, field)
Paste tab-delimited text into the grid.
paste - paste(text)
Paste tab-delimited text into the grid.
prevCell - prevCell(col_ind, editable)
Returns previous cell or null if it is first cell in the row.
prevRow - prevRow(index)
Returns previous row or null if it is the very first row.
refreshBody - refreshBody()
Refreshes only the portion of grid that has records.
refreshCell - refreshCell(recid, field)
Refreshes one cell on the screen.
refreshRanges - refreshRanges()
Refreshes ranges defined for the grid.
refreshRow - refreshRow(recid)
Refreshes one row on the screen.
reload - reload([callBack])
Reloads records from remote data source.
remove - remove(recid1, recid2, ...)
Removes records from the grid.
removeColumn - removeColumn(field, [field], ...)
Removes a column or columns from the grid.
removeRange - removeRange(range_name, [range_name], ...)
Removes a range or ranges from the grid.
removeSearch - removeSearch(field, [field], ...)
Removes a search or searches from the grid.
request - request(cmd, [params, [url, [callBack]]])
Prepares and submits request to the server.
requestComplete - requestComplete(status, cmd, [callBack])
Called to process data that was returned from the server.
reset - reset([noRefresh])
Resets the grid to the initial state.
resizeBoxes - resizeBoxes()
Called to resize grid's elements.
resizeRecords - resizeRecords()
Called to resize grid's records.
save - save()
Called when user saves inline editing changes.
scroll - scroll(event)
Rebuilds grids records HTML based on scroll bar position.
scrollIntoView - scrollIntoView([ind], [column], [instant])
Scrolls to the specified records
scrollToColumn - scrollToColumn(field)
Scrolls to the specified column
search - search([field], value)
Searches records in the grid.
searchClose - searchClose()
Closes overlay with advanced search options (if it was open).
searchOpen - searchOpen()
Opens overlay with advanced search options.
searchReset - searchReset([noRefresh])
Resets previous search to the default values.
searchShowFields - searchShowFields()
Resets previous search to the default values.
select - select(recid1, recid2, ...)
Selects records in the grid.
selectAll - selectAll()
Selects all records in the grid.
selectNone - selectNone()
Unselects all selected records in the grid.
selectionRestore - selectionRestore([noRefresh])
Restores last remembered selection
selectionSave - selectionSave()
Remembers current selection
set - set([recid], record, [noRefresh])
Finds the record and extends it with provided object.
showColumn - showColumn(field, [field], ...)
Shows a column or columns.
showSearch - showSearch(field, [field], ...)
Shows a search or searches.
skip - skip(offset)
Skips a number of records specified.
sort - sort()
Sorts records in the grid.
stateReset - stateReset()
Resets grid state to the default one.
stateRestore - stateRestore([stateObj])
Restores grid state from local storage.
stateSave - stateSave([returnOnly])
Saves grid state into local storage.
status - status([msg])
Displays status text.
toggle - toggle(recid)
Toggles record between expand and collapse states.
toggleColumn - toggleColumn(field, [field], ...)
Toggles column between hidden and shown states.
toggleSearch - toggleSearch(field, [field], ...)
Toggles a search between hidden and shown states.
toolbarAdd - toolbarAdd()
Called when user clicks the Add New button on the toolbar.
toolbarDelete - toolbarDelete([force])
Called when user clicks the Delete button on the toolbar.
unlock - unlock()
Unlocks the grid.
unselect - unselect(recid1, recid2, ...)
Unselects records in the grid.
update - update(cells)
Updates specified cells
updateColumn - updateColumn(fields, changes)
Updates column definition
updateToolbar - updateToolbar(sel)
Enable/disable toobar buttons based on record selection

Common Methods

destroy - destroy()
Destroys the object.
off - off(type, [handler])
Removes event listener from the object.
on - on(type, handler)
Adds event listener to a object.
refresh - refresh([id])
Refreshes the object without completely re-inserting it.
render - render([box])
Renders the object into box.
resize - resize()
Resizes the object to the width and height of its container.
trigger - trigger(eventData)
Executes all event listeners added with on() method.