Print Friendly

# Class YAHOO.ext.grid.PagedGridView

Package: | YAHOO.ext.grid
Class: | PagedGridView
Extends: | GridView
Defined In: | PagedGridView.js

Extends the default GridView to add a paging interface.

## Public Properties

Property | Defined By
--- | ---
| afterPageText : String | PagedGridView
Customizable piece of the default paging text (defaults to "of %0")
| beforePageText : String | PagedGridView
Customizable piece of the default paging text (defaults to "Page")
| firstText : String | PagedGridView
Customizable piece of the default paging text (defaults to "First Page")
| lastText : String | PagedGridView
Customizable piece of the default paging text (defaults to "Last Page")
| nextText : String | PagedGridView
Customizable piece of the default paging text (defaults to "Next Page")
| prevText : String | PagedGridView
Customizable piece of the default paging text (defaults to "Previous Page")
| refreshText : String | PagedGridView
Customizable piece of the default paging text (defaults to "Refresh")

## Public Methods

Method | Defined By
--- | ---
| PagedGridView() | PagedGridView
This class is created for you automatically if your data model is set to use paging.
| autoSizeColumn(`Number colIndex`, `Boolean forceMinSize`) : void | GridView
Autofit a column to it's content.
| autoSizeColumns() : void | GridView
Autofits all columns to their content and then expands to fit any extra space in the grid
| ensureVisible(`Number/HTMLElement row`, `Boolean disableDelay`) : void | GridView
Scrolls the specified row into view. This call is automatically buffered (delayed), to disable the delay, pass true f...
| fitColumns() : void | GridView
Autofits all columns to the grid's width proportionate with their current size
| focusRow(`Number/HTMLElement row`) : void | GridView
Focuses the specified row. The preferred way to scroll to a row is ensureVisible.
| getCellAtPoint(`Number x`, `Number y`) : Array | GridView
Returns the rowIndex/columnIndex of the cell found at the passed page coordinates
| getPageToolbar() : YAHOO.ext.Toolbar | PagedGridView
Returns the toolbar used for paging so you can add new buttons.
| setCSSStyle(`Number colIndex`, `String name`, `String value`) : void | GridView
Set a css style for a column dynamically.

## Public Events

This class has no public events.

## Property Details

### afterPageText

`public String afterPageText`
Customizable piece of the default paging text (defaults to "of %0")
This property is defined by PagedGridView.

### beforePageText

`public String beforePageText`
Customizable piece of the default paging text (defaults to "Page")
This property is defined by PagedGridView.

### firstText

`public String firstText`
Customizable piece of the default paging text (defaults to "First Page")
This property is defined by PagedGridView.

### lastText

`public String lastText`
Customizable piece of the default paging text (defaults to "Last Page")
This property is defined by PagedGridView.

### nextText

`public String nextText`
Customizable piece of the default paging text (defaults to "Next Page")
This property is defined by PagedGridView.

### prevText

`public String prevText`
Customizable piece of the default paging text (defaults to "Previous Page")
This property is defined by PagedGridView.

### refreshText

`public String refreshText`
Customizable piece of the default paging text (defaults to "Refresh")
This property is defined by PagedGridView.

## Constructor Details

### PagedGridView

`public function PagedGridView()`
This class is created for you automatically if your data model is set to use paging.
Parameters:

- None.

## Method Details

### autoSizeColumn

`public function autoSizeColumn(`Number colIndex`, `Boolean forceMinSize`)`
Autofit a column to it's content.
Parameters:

- `colIndex` : Number
- `forceMinSize` : Boolean
  true to force the column to go smaller if possible

Returns:

- `void`

This method is defined by GridView.

### autoSizeColumns

`public function autoSizeColumns()`
Autofits all columns to their content and then expands to fit any extra space in the grid
Parameters:

- None.

Returns:

- `void`

This method is defined by GridView.

### ensureVisible

`public function ensureVisible(`Number/HTMLElement row`, `Boolean disableDelay`)`
Scrolls the specified row into view. This call is automatically buffered (delayed), to disable the delay, pass true for disableDelay.
Parameters:

- `row` : Number/HTMLElement
  The index of a row or the row itself
- `disableDelay` : Boolean

Returns:

- `void`

This method is defined by GridView.

### fitColumns

`public function fitColumns()`
Autofits all columns to the grid's width proportionate with their current size
Parameters:

- None.

Returns:

- `void`

This method is defined by GridView.

### focusRow

`public function focusRow(`Number/HTMLElement row`)`
Focuses the specified row. The preferred way to scroll to a row is ensureVisible.
Parameters:

- `row` : Number/HTMLElement
  The index of a row or the row itself

Returns:

- `void`

This method is defined by GridView.

### getCellAtPoint

`public function getCellAtPoint(`Number x`, `Number y`)`
Returns the rowIndex/columnIndex of the cell found at the passed page coordinates
Parameters:

- `x` : Number
- `y` : Number

Returns:

- `Array`
  [rowIndex, columnIndex]

This method is defined by GridView.

### getPageToolbar

`public function getPageToolbar()`
Returns the toolbar used for paging so you can add new buttons.
Parameters:

- None.

Returns:

- `YAHOO.ext.Toolbar`

This method is defined by PagedGridView.

### setCSSStyle

`public function setCSSStyle(`Number colIndex`, `String name`, `String value`)`
Set a css style for a column dynamically.
Parameters:

- `colIndex` : Number
  The index of the column
- `name` : String
  The css property name
- `value` : String
  The css value

Returns:

- `void`

This method is defined by GridView.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.