Methods

add - add(record)
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.
collapse - collapse(recid)
Called when user clicks on the collapse record icon.
columnClick - columnClick(field, [event])
Called when user clicks on the column.
columnOnOff - columnOnOff(el, event, field, value)
Called when user opens grid settings (on grids toolbar) and selects an item.
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.
getChanges - getChanges()
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.
getFooterHTML - getFooterHTML()
Returns HTML for grid footer.
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()
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.
initColumnOnOff - initColumnOnOff()
Refreshes toolbar button that allows to show/hide columns.
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])
Performs sort on local data set.
lock - lock(message, [showSpinner])
Locks the grid.
mergeChanges - mergeChanges()
Merges user changes into the records array.
parseField - parseField(obj, field)
Paste tab-delimmited text into the grid.
paste - paste(text)
Paste tab-delimmited text into the grid.
refreshRanges - refreshRanges()
Refreshes ranges defined for the grid.
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.
save - save()
Called when user saves inline editing changes.
scroll - scroll(event)
Rebuilds grids records HTML based on scroll bar position.
scrollIntoView - scrollIntoView(ind)
Called when user saves inline editing changes.
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.
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.
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.

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.