Class: Grid

Grid

Table/Grid built in Google Closure
  • Data Virtualization ~ 100,000 Rows
  • Active Cell and Active Row Highlight , Row Selection
  • Sorting , Column Resizing , Header Cell Menu , Paging
  • Column Formatting , Keyboard Navigation , Data Filter
  • Column Move
  • Sticky Footer Row
  • Cell Editing

new Grid(opt_domHelper)

Parameters:
Name Type Argument Description
opt_domHelper goog.dom.DomHelper <optional>
Optional DOM helper.
Source:

Extends

  • goog.ui.Component

Classes

GridDataCellEvent
GridHeaderCellEvent
GridRowEvent
GridSortCellEvent

Members

<static> EventType :string

Events of grid
Type:
  • string
Properties:
Name Type Default Description
HEADER_CELL_ON_CLICK string header-cell-on-click On Click of Header Cell , this event is dispatched
HEADER_CELL_MENU_CLICK string header-cell-menu-click On Header Cell Menu Option Click - this event is dispatched , this will not dispatch Header-cell-on-click event
SORT string on-sort If Sorting is allowed , On Click of Header Cell this event is dispatched before Header-cell-on-click
PAGE_INDEX_CHANGED string on-page-index-change If Paging is allowed , On Change of Page Index this event is dispatched
PAGE_SIZE_CHANGED string on-page-size-change If Paging is allowed , On Change of Page Size this event is dispatched , this will also dispatch Page-index-change . since page size reset page index to 0
DATACELL_ON_ACTION string datacell-on-action On action of Data Cell
HEADERCELLS_RENDERED string headercells-rendered This event is dispatched after all header cells are rendered
AFTER_HEADERCELL_RENDER string after-headercell-render This event is dispatched ,after header cell is rendered. This will be generated for each header cell
DATAROWS_CHANGED string on-grid-datarows-changed This event is dispatched when a DataRow is Changed e.g AddDataRow and UpdateDataRow . This will also dispatch DataSource-changed event.
DATASOURCE_CHANGED string on-grid-datasource-changed This event is dispatched when DataSource is Changed
COLUMNS_CHANGED string on-columns-changed This event is dispatched when Columns are Changed on the Grid
GRIDROW_HIGHLIGHT string on-gridrow-highlighted This event is dispatched On GridRow Highlight
GRIDROW_UNHIGHLIGHT string on-gridrow-unhighlighted This event is dispatched On GridRow unhighlight
GRIDROW_SELECT string on-gridrow-select If Row Selection is allowed , this event is dispatched when Row is selected
GRIDROW_UNSELECT string on-gridrow-unselect If Row Selection is allowed , this event is dispatched when Row is unselected
RENDERED string rendered
ON_COLUMN_RESIZE string on-column-resize On Resizing columns
Source:

<static> ScrollDirection :number

Scroll Direction of Grid
Type:
  • number
Properties:
Name Type Default Description
UP number 1 Scroll direction up
DOWN number 2 Scroll direction down
LEFT number 3 Scroll direction left
RIGHT number 4 Scroll direction right
NONE number 0 Scroll direction none
Source:

<static> SelectionMode :number

Selection Mode of Grid
Type:
  • number
Properties:
Name Type Default Description
NONE number 0 No Selection Mode
CELL number 1 Cell can be selected
ROW number 2 Single Row Selection
MULTIPLE_ROW number 3 Multiple Row Selection
Source:

<static> SortDirection :number

Sort Direction
Type:
  • number
Properties:
Name Type Default Description
NONE number 0 None - no sort
ASC number 1 Asending Order
DESC number 2 Desending Order
Source:

<static> THROTTLE_DELAY :number

Throttle Delay in ms
Type:
  • number
Source:

bodyCanvas_ :pear.ui.GridRow

Type:
Source:

highligtedGridrow_ :goog.ui.Component

Type:
  • goog.ui.Component
Source:

<protected> logger :goog.log.Logger

Logging object.
Type:
  • goog.log.Logger
Source:

Methods

addDataRow(datarow)

add a single row , this dispatch DATAROW_CHANGE and DATASOURCE_CHANGED event. this will also dispatch events from DataView
Parameters:
Name Type Description
datarow Object.<string, *>
Source:
Example
var data = {};
   data.columnId =  'sample data';
     ...
     ...
     ...
   grid.addDataRow(data);
   ...
   ...
   grid.refresh();

<protected> buildCSSRules()

Prepare ALL CSS Rules
Source:

canHighlightGridRow(gridrow) → {boolean}

Returns whether the given gridrow can be highlighted.
Parameters:
Name Type Argument Description
gridrow pear.ui.GridRow <nullable>
The item to check.
Source:
Returns:
Whether the item can be highlighted.
Type
boolean

<protected> cellHighlightHelper(fn, startCellIndex)

Helper function that manages the details of moving the highlight among child controls in response to keyboard events.
Parameters:
Name Type Description
fn function Function that accepts the current and maximum indices, and returns the next index to check.
startCellIndex number Start index.
Source:

clearHighlightedRow()

Clear Highlighted Row
Source:

clearSelectedGridRows()

Clear all row selection , also raises ROW-UNSELECT event for each row , getting unselected
Source:

closeActiveEditor()

Close Editor
Source:

closeAllGridRowDetails()

Close All GridRow Details
Source:

createDom()

Source:

disposeInternal()

Source:

enterDocument()

Source:

getActiveEditorGridRow() → {pear.ui.GridRow}

Get Active Editor Grid Row
Source:
Returns:
Instance of gridrow beign edited
Type
pear.ui.GridRow

getBodyCanvas() → {goog.ui.Component}

Body Canvas
Source:
Returns:
Type
goog.ui.Component

getBodyCanvasSize(opt_refresh) → {goog.math.Size}

get size of Body Canvas
Parameters:
Name Type Argument Description
opt_refresh boolean <optional>
Recalculate size
Source:
Returns:
Type
goog.math.Size

getCellBorderBox(uniqClass) → {goog.math.Box}

Get Cell Border Box , this will create a Cell in Document and will store the value of BorderBox and then remove the cell from document
Parameters:
Name Type Description
uniqClass string unique css class for this instance of pear grid
Source:
Returns:
Type
goog.math.Box

getCellContentPaddingBox(uniqClass) → {goog.math.Box}

Get Cell Content Padding Box , this will create a temporary Cell Content in Document will store the value of PaddingBox and then remove the Element
Parameters:
Name Type Description
uniqClass string unique css class for this instance of pear grid
Source:
Returns:
TODO : store the border box also - Cell Content shows border on Hover
Type
goog.math.Box

getClonedDataRows() → {Array.<Object.<string, *>>}

Get All DataRows
Source:
To Do:
  • - use of deep cloning
Returns:
Type
Array.<Object.<string, *>>

getClonedDataViews() → {Array.<Object.<string, *>>}

get rows , currently dispalyed or loaded in grid , in case of paging this will return all the rows
Source:
Returns:
Type
Array.<Object.<string, *>>

getColumnById(id) → {pear.data.Column}

Get column by id
Parameters:
Name Type Description
id string UniqueId to identify a Column
Source:
Returns:
Type
pear.data.Column

getColumns() → {Array.<pear.data.Column>}

clone array of columns and return them
Source:
Returns:
Type
Array.<pear.data.Column>

getColumnWidthAt(index) → {number}

get width of column
Parameters:
Name Type Description
index number Column Index
Source:
Returns:
Type
number

getComputedRowHeight() → {number}

get Calculated Row Height
Source:
Returns:
Type
number

getConfiguration() → {*}

configuration object of grid
Source:
Returns:
Type
*

getCSSRule(selectorText) → {Object}

Get CSS Rule
Parameters:
Name Type Description
selectorText string Selector
Source:
Returns:
CSS Rule in key value pair
Type
Object

<protected> getCSSStyleSheet() → {CSSStyleSheet}

Get Stylesheet for this instance of Grid
Source:
Returns:
Stylesheet for this instance
Type
CSSStyleSheet

getDataRows() → {Array.<Object.<string, *>>}

Get All DataRows - for cloned Rows use getClonedDataRows
Source:
Returns:
Type
Array.<Object.<string, *>>

getDataRowViews() → {Array.<pear.data.RowView>}

Get All RowViews
Source:
Returns:
Type
Array.<pear.data.RowView>

getDataView() → {pear.data.DataView}

DataView associated with this Grid. All data is encapsulated with in DataView DataView also acts like a Adapter between DataTable and Grid
Source:
Returns:
Type
pear.data.DataView

getDataViewRowCount() → {number}

number of rows currently loaded in grid
Source:
Returns:
Type
number

getEditor(column) → {pear.ui.editor.IEditor}

get Editor Associated with the Column
Parameters:
Name Type Description
column pear.data.Column
Source:
Returns:
Editor
Type
pear.ui.editor.IEditor

getEditorMediator() → {pear.ui.editor.CellEditorMediator}

Get Editor Mediator
Source:
Returns:
[description]
Type
pear.ui.editor.CellEditorMediator

<protected> getFocusEventTarget() → {Element}

Focus Event Target
Source:
Returns:
[description]
Type
Element

getFocusHandler() → {goog.events.KeyHandler}

Returns the keyboard event handler for this grid, lazily created the first time this method is called. The keyboard event handler listens for keyboard events on the grid canvas
Source:
Returns:
Keyboard event handler for this container.
Type
goog.events.KeyHandler

getFooterRow() → {pear.ui.GridHeaderRow}

Header Row
Source:
Returns:
Type
pear.ui.GridHeaderRow

getGridRowAt(index) → {pear.ui.GridRow}

Get a gridrow at position
Parameters:
Name Type Description
index number
Source:
Returns:
Type
pear.ui.GridRow

getGridRowById(id) → {pear.ui.GridRow}

Returns the 0-based index of the given child component, or -1 if no such child is found.
Parameters:
Name Type Description
id string
Source:
Returns:
gridrow
Type
pear.ui.GridRow

getGridRowDetailHeight() → {number}

Get GridRow Details Height , if height is not set than it returns 1/3 one third of grid size
Source:
Returns:
height of detail
Type
number

getGridRows() → {Array.<pear.ui.GridRow>}

All gridrows visible in Grid , in case of paging this should show all available in all pages
Source:
Returns:
Type
Array.<pear.ui.GridRow>

getGridRowWidth() → {number}

[getGridRowWidth description]
Source:
Returns:
[description]
Type
number

getHeaderRow() → {pear.ui.GridHeaderRow}

Header Row
Source:
Returns:
Type
pear.ui.GridHeaderRow

getHeight() → {number}

height of grid
Source:
Returns:
Type
number

getHighlightedCell() → {pear.ui.GridCell}

get current highlighted Cell
Source:
Returns:
Type
pear.ui.GridCell

getHighlightedCellIndex() → {number}

Returns the index of the currently highlighted item (-1 if none).
Source:
Returns:
Index of the currently highlighted item.
Type
number

getHighlightedGridRow() → {pear.ui.GridRow}

get current highlighted Row
Source:
Returns:
Type
pear.ui.GridRow

getHighlightedGridRowIndex() → {number}

Returns the index of the currently highlighted item (-1 if none).
Source:
Returns:
Index of the currently highlighted item.
Type
number

<protected> getKeyEventTarget() → {Element}

Key Event Target
Source:
Returns:
[description]
Type
Element

getKeyHandler() → {goog.events.KeyHandler}

Returns the keyboard event handler for this grid, lazily created the first time this method is called. The keyboard event handler listens for keyboard events on the grid canvas
Source:
Returns:
Keyboard event handler for this container.
Type
goog.events.KeyHandler

<protected> getMaxAllowableRowsVirtualRender(opt_reset) → {number}

Calculates number of rows needed for virtual rendering
Parameters:
Name Type Argument Description
opt_reset boolean <optional>
if true, recalculates
Source:
Returns:
[description]
Type
number

getMaxPageIndex() → {number}

get the Max Page Index
Source:
Returns:
Type
number

<protected> getOwnerGridCell(node) → {pear.ui.GridCell}

Returns the GridCell that owns the given DOM node, or null if no such GridCell is found.
Parameters:
Name Type Description
node Node DOM node whose owner is to be returned.
Source:
Returns:
GridCell Control
Type
pear.ui.GridCell

<protected> getOwnerGridRow(node) → {pear.ui.GridRow}

Returns the GridRow that owns the given DOM node, or null if no such GridRow is found.
Parameters:
Name Type Description
node Node DOM node whose owner is to be returned.
Source:
Returns:
GridRow Container
Type
pear.ui.GridRow

getPagedDataRowViews() → {Array.<pear.data.RowView>}

Get all datarow views for current page index
Source:
Returns:
Type
Array.<pear.data.RowView>

getPageIndex() → {number}

Get the current page index of grid
Source:
Returns:
Type
number

getPageSize() → {number}

Get the page size configuration
Source:
Returns:
Type
number

getPluginByClassId(classId) → {pear.ui.Plugin}

Returns the registered plugin with the given classId.
Parameters:
Name Type Description
classId string classId of the plugin.
Source:
Returns:
Registered plugin with the given classId.
Type
pear.ui.Plugin

getPlugins() → {Object.<string, pear.ui.Plugin>}

Get a list of all plugins currently loaded by the grid
Source:
Returns:
Type
Object.<string, pear.ui.Plugin>

getScrollbarWidth() → {number}

Returns the width of scrollbar , if browser uses scrollbar
Source:
Returns:
Type
number

getSelectedGridRowsIds() → {Array.<string>}

get Selected Rows Ids
Source:
Returns:
Type
Array.<string>

getSortColumnId() → {string}

Get the column Index on which sort is applied
Source:
Returns:
Type
string

getSortedHeaderCell() → {pear.ui.GridHeaderCell}

get Header Cell on which Sort is applied
Source:
Returns:
Type
pear.ui.GridHeaderCell

getStyleElement() → {Element}

Get the Style Element
Source:
Returns:
Style Node
Type
Element

getTitle() → {string}

Get Grid Title
Source:
Returns:
title of grid
Type
string

getUniqueId() → {string}

Get Unique Id for this Instance of Grid
Source:
Returns:
Type
string

getViewport() → {goog.ui.Component}

Source:
Returns:
Type
goog.ui.Component

getViewportSize() → {goog.math.Size}

get size of Viewport
Source:
Returns:
Type
goog.math.Size

getViewportTopRowIndex() → {number}

Get Top visible row in the Viewport
Source:
Returns:
Index of GridRow
Type
number

getWidth() → {number}

width of grid
Source:
Returns:
Type
number

gotoFirstPage() → {number}

Goto First Page
Source:
Returns:
Type
number

gotoLastPage() → {number}

Goto Last Page
Source:
Returns:
Type
number

gotoNextPage() → {number}

Goto Next Page
Source:
Returns:
Type
number

gotoPreviousPage() → {number}

Goto Previous Page
Source:
Returns:
Type
number

<protected> handleAction(be)

Handle Action on Body - Mainly to Capture Action on GridCell
Parameters:
Name Type Description
be goog.events.BrowserEvent [description]
Source:

<protected> handleBlur(be)

[description]
Parameters:
Name Type Description
be goog.events.BrowserEvent [description]
Source:

<protected> handleBodyCanvasScroll(e)

Parameters:
Name Type Description
e goog.events.BrowserEvent
Source:

<protected> handleDataCellAction(cell)

Handle action events on GridCell Highlight Row , Select Row . Also dispatch DATACELL_BEFORE/AFTER Action Event
Parameters:
Name Type Description
cell pear.ui.GridCell
Source:

<protected> handleDoubleClick(be)

Handle Double Click
Parameters:
Name Type Description
be goog.events.BrowserEvent [description]
Source:

<protected> handleFocus(be)

Handles focus events raised when the key event target receives keyboard focus.
Parameters:
Name Type Description
be goog.events.BrowserEvent Focus event to handle.
Source:

<protected> handleHeaderCellClick(ge)

Handle Header Cell Action ( Click) Event this will dispatch BEFORE_HEADER_CELL_CLICK,SORT,AFTER_HEADER_CELL_CLICK
Parameters:
Name Type Description
ge goog.events.Event [description]
Source:

<protected> handleHeaderCellOptionClick(ge)

On Header Cell Option {Menu Container} Click
Parameters:
Name Type Description
ge goog.events.Event [description]
Source:

<protected> handleKeyEvent(e) → {boolean}

[handleKeyEvent description]
Parameters:
Name Type Description
e goog.events.KeyEvent Key event to handle.
Source:
Returns:
Whether the key event was handled.
Type
boolean

<protected> handleKeyEventInternal(e) → {boolean}

Parameters:
Name Type Description
e goog.events.KeyEvent Key event to handle.
Source:
Returns:
Whether the event was handled by the container (or one of its children).
Type
boolean

<protected> handleKeyEventOnBodyCanvas(e) → {boolean}

handle Keys events on Grid
Parameters:
Name Type Description
e goog.events.KeyEvent Key event to handle.
Source:
Returns:
[description]
Type
boolean

highlightFirstCell()

Highlights the first highlightable item in the container
Source:

highlightFirstRow()

Highlights the first highlightable item in the container
Source:

highlightGridCell(gridcell)

Highlight GridCell
Parameters:
Name Type Description
gridcell pear.ui.GridCell [description]
Source:

highlightGridRow(gridrow)

Highlight GridRow and Set Highlighted Index
Parameters:
Name Type Description
gridrow pear.ui.GridRow [description]
Source:

highlightLastCell()

Highlights the last highlightable item in the container.
Source:

highlightLastRow()

Highlights the last highlightable item in the container.
Source:

highlightNextCell(opt_gotonextrow)

Highlights the next highlightable item (or the first if nothing is currently highlighted).
Parameters:
Name Type Argument Description
opt_gotonextrow boolean <optional>
if true , highlight next row first cell
Source:

highlightNextRow()

Highlights the next highlightable item (or the first if nothing is currently highlighted).
Source:

highlightPreviousCell(opt_gotonextrow)

Highlights the previous highlightable item (or the last if nothing is currently highlighted).
Parameters:
Name Type Argument Description
opt_gotonextrow boolean <optional>
if true , highlight previous row last cell
Source:

highlightPreviousRow()

Highlights the previous highlightable item (or the last if nothing is currently highlighted).
Source:

indexOfGridRow(gridrow) → {number}

Returns the 0-based index of the given gridrow
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:
Returns:
0-based index of gridrow; -1 if not found.
Type
number

isActiveEditorGridRow(gridrow) → {boolean}

Is GridRow currently hosting Active Editor
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:
Returns:
Type
boolean

isActiveGridRow(gridrow) → {boolean}

Is GridRow currently Active ?
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:
Returns:
Type
boolean

isBodyHasHScroll() → {boolean}

Whether body has Horizontal Scroll Visible
Source:
Returns:
true , if visible
Type
boolean

isBodyHasVScroll() → {boolean}

Whether Body has Vertical Scroll Visible
Source:
Returns:
true , if visible
Type
boolean

isEnabled() → {boolean}

Source:
To Do:
  • - TBD
Returns:
true always
Type
boolean

isFirstRowInGrid(gridrow) → {boolean}

Is first row of grid
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:
Returns:
true, is first row , index equal 0
Type
boolean

isFocusOnGrid() → {boolean}

Check whether Grid is in Focus
Source:
Returns:
true, if grid is in focus
Type
boolean

isLastRowInGrid(gridrow) → {boolean}

Is last row of grid
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:
Returns:
true, is first row , index equal 0
Type
boolean

isRendered() → {boolean}

is Grid is rendered ?
Source:
Returns:
Type
boolean

isSelectionModeOn() → {boolean}

Is Selection Mode is On
Source:
Returns:
true , if selection mode is on
Type
boolean

isVisible() → {boolean}

Source:
To Do:
  • - TBD
Returns:
true always
Type
boolean

refresh()

refresh grid , Just the Body of Grid Clear the Rendered Grid Row Cache , Clear the Rendered Grid Prepare Grid Rows from the DataSource Set the height of canvas and cache Rendered Rows Restore Highlight Rows and Restore Selected Rows
Source:

refreshAll(opt_redrawStyle)

Entire Body of Grid is refreshed - header , footer , body and CSS Style
Parameters:
Name Type Argument Description
opt_redrawStyle boolean <optional>
if true , rebuild CSS Styles
Source:

refreshCssStyle(opt_redraw)

refresh CSS Styles
Parameters:
Name Type Argument Description
opt_redraw boolean <optional>
[description]
Source:

refreshFooterRow()

refresh footer row
Source:

refreshHeader()

refresh header row
Source:

refreshOnColumnResize()

On columns width changed
Source:

<protected> registerEventsOnBodyCanvas()

Register events on Event Body
Source:

<protected> registerEventsOnGrid()

Register events on Grid - Mainly Focus and Blur Events
Source:

<protected> registerEventsOnGridRow(row)

Register Event on Grid Row - Avoid this this can bring performance down
Parameters:
Name Type Description
row pear.ui.GridRow
Source:

<protected> registerEventsOnHeaderRow()

Register Event on Grid Header Row
Source:

<protected> registerEventsOnViewport()

Register events on Event Body - Mainly Scroll Event
Source:

registerPlugin(plugin)

Registers the plugin with the grid.
Parameters:
Name Type Description
plugin pear.ui.Plugin The plugin to register.
Source:

removeDataRow(rowid)

remove a single row , this dispatch a DATASOURCE_CHANGE event. this will also dispatch events from DataView
Parameters:
Name Type Description
rowid string
Source:

resetHighlightedIndex()

Reset Highlighted Index
Source:

<protected> rowHighlightHelper(fn, startRowIndex) → {boolean}

Helper function that manages the details of moving the highlight among child controls in response to keyboard events.
Parameters:
Name Type Description
fn function Function that accepts the current and maximum indices, and returns the next index to check.
startRowIndex number Start index.
Source:
Returns:
Whether the highlight has changed.
Type
boolean

scrollCellIntoView(gridrow, opt_gridcell)

Bring Cell into View , If getHighlighted Cell of Gridrow is
Parameters:
Name Type Argument Description
gridrow pear.ui.GridRow
opt_gridcell pear.ui.GridCell <optional>
[description]
Source:

selectGridRow()

Select highlighted GridRow
Source:

setColumns(cols)

set columns of grid , dispatch COLUMN_CHANGED event
Parameters:
Name Type Description
cols Array.<pear.data.Column>
Source:

setColumnVisibility(columnId, visible)

set Column Visibility - show/hide column
Parameters:
Name Type Description
columnId string ColumnId of @link {pear.data.Column}
visible boolean true, to show the column
Source:

setColumnWidth(index, width)

Set the width of column , this will instantly apply the changes
Parameters:
Name Type Description
index number
width number
Source:

setConfiguration(config) → {Object.<string, *>}

Set configuration object
Parameters:
Name Type Description
config Object.<string, *>
Source:
Returns:
Type
Object.<string, *>

setCSSRule(text)

set CSS Rule in DOM
Parameters:
Name Type Description
text string Rule Text
Source:

setDataRows(data)

array of datarows - dispatches DATASOURCE_CHANGE event
Parameters:
Name Type Description
data Array
Source:

setDataView(dv)

DataView associated with this Grid. All data is encapsulated with in DataView DataView also acts like a Adapter between DataTable and Grid.
Parameters:
Name Type Description
dv pear.data.DataView
Source:

setEditor(fn)

get Editor Associated with the Column
Parameters:
Name Type Description
fn function
Source:

setFocusOnGrid()

Set Focus on Grid
Source:

setFrozenColumns(index, freeze)

Freeze Columns .
Parameters:
Name Type Description
index number All columns upto/including index will be frozen
freeze boolean if true, will freeze the column
Source:

setGridRowDetailHeight(height)

[setGridRowDetailHeight description]
Parameters:
Name Type Description
height number [description]
Source:

setHeight(height) → {number}

set height of grid
Parameters:
Name Type Description
height number
Source:
Returns:
height of grid
Type
number

setHighlightedCellByIndex(index)

Returns the index of the currently highlighted item (-1 if none).
Parameters:
Name Type Description
index number of the currently highlighted item.
Source:

setHighlightedGridRowByIndex(index)

Highlights the item at the given 0-based index (if any). If another item was previously highlighted, it is un-highlighted.
Parameters:
Name Type Description
index number Index of item to highlight (-1 removes the current highlight).
Source:

<protected> setHighlightedIndexFromKeyEvent(index)

Helper method that sets the highlighted index to the given index in response to a keyboard event. The base class implementation simply calls the #setHighlightedIndex method, but subclasses can override this behavior as needed.
Parameters:
Name Type Description
index number Index of item to highlight.
Source:

setPageIndex(index)

Set the current page index of grid , Also dispatches PageIndex Change Event
Parameters:
Name Type Description
index number
Source:

setPageSize(size)

Set the page size configuration
Parameters:
Name Type Description
size number
Source:
Fires:
  • {pear.ui.Grid.EventType.event:PAGE_SIZE_CHANGED}

setSortColumnId(id) → {string}

set Sorted Column Id
Parameters:
Name Type Description
id string
Source:
Returns:
column id
Type
string

setTitle(title)

set Title of Grid
Parameters:
Name Type Description
title string title of grid
Source:

<protected> setTopOfGridRow(gridrow)

Set Top of GridRow
Parameters:
Name Type Description
gridrow pear.ui.GridRow
Source:

setWidth(width) → {number}

set width of grid
Parameters:
Name Type Description
width number
Source:
Returns:
Width of Grid
Type
number

showCellEditor(gridcell)

Show Cell Editor
Parameters:
Name Type Description
gridcell pear.ui.GridCell
Source:

showFooterRow(display)

Show Footer Row
Parameters:
Name Type Description
display boolean true : shows footer row\
Source:

showGridRowDetails(gridrow, display)

Show or Hide GridRow Details
Parameters:
Name Type Description
gridrow pear.ui.GridRow
display boolean
Source:

transformInternalCSSRuleToCSSRule(selectorText, ruleobject) → {string}

transform Rule Object of Key,Value pair to Style Text
Parameters:
Name Type Description
selectorText string selector
ruleobject Object CSS Rule in key value pair
Source:
Returns:
CSS Rule in Text
Type
string

unregisterPlugin(plugin)

Unregisters the plugin with this field.
Parameters:
Name Type Description
plugin pear.ui.Plugin The plugin to unregister.
Source:

updateDataRow(rowid, row)

update a datarow , this dispatch a DATAROW_CHANGE event. this will also dispatch events from DataView
Parameters:
Name Type Description
rowid string
row Object.<string, *>
Source: