JS Grid Delegates

SharePoint 2010

Last modified: March 09, 2015

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.

The following table lists the JS Grid delegates.

JS Grid Delegate Reference



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.


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


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


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.


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


Provides the ability to dynamically modify the hierarchy.


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.


Called to get row style information.


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.


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


Called when there are too many autofilter entries to display.


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


Show a custom column configuration dialog.


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.


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