Compartilhar via


JS Grid Delegates

Applies to: SharePoint Foundation 2010

The JS Grid control supports a variety of delegates. Using these delegates provides you a greater degree of control over the behavior of the JS Grid control.

JS Grid Delegates

The following table lists the JS Grid delegates.

JS Grid Delegate Reference

Delegate

Description

AddColumnMenuItems(columnKey, fnInsertMenuItem, fnInsertSeparator)

Used when the column drop-down menu is activated.

AddColumnMenuItems is called only if WillAddColumnMenuItems returns true for this column and if ExpandColumnMenu delegate is not present.

AutoFilter(newState)

Called when a column header menu is pulled down and an autofilter item is selected.

CreateEntryRecord()

Called as soon as some data is entered for a new row.

DeleteRecords()

Called by the grid to request that the page delete currently selected records.

ExpandColumnMenu(columnKey, position, fnOnMenuCollapsed)

This delegate is responsible for creating and rendering a column menu.

ExpandConflictResolution

Internal only; this delegate is not intended to be used directly in your code.

ExpandDelayLoadedHierarchyNode(recordKey)

Provides the ability to dynamically modify the hierarchy.

Filter

Internal only; this delegate is not intended to be called directly from your code.

GetAutoFilterEntries (currentAutoFilterState, initiatingColumnKey, columnKeys, fnSuccess, fnFailure)

Called when the column menu is dropped down and the grid needs to populate the autofilter entries in the menu.

GetGridRowStyleId()

Called to get row style information.

GetRecordEditMode(record)

This delegate is called for each cell of a line when the line is rendered. It is also called if a cell is being selected.

IndentRecords ()

Called when the grid is requesting the controller to indent the currently selected records.

InsertRecord()

Called when the grid is requesting the page to insert a record at the currently selected row.

LaunchFilterDialog(colKey)

Called when there are too many autofilter entries to display.

OutdentRecords()

Called when the grid is requesting the controller to outdent the currently selected records.

ShowColumnConfigurationDialog()

Show a custom column configuration dialog.

Sort(array)

The page is asking the grid to sort, passing in an array of objects.

TryInsertEntryRecord(entryRecord, entryRecordPropertyUpdates, fnRecordCommitSucceeded, fnRecordCommitFailed.)

Called as soon as the user leaves the newly created row. This delegate ends the sequence initiated with the delegate of type CreateEntryRecord.

WillAddColumnMenuItems(colKey)

If the AddColumnItems delegate is going to add items to this column menu, this delegate returns true.

See Also

Reference

Microsoft.SharePoint.JSGrid

JSGrid