본문 바로가기
개발언어/3rd Part

WebGrid - Row Object

by 엔돌슨 2008. 1. 31.
반응형

row

The row object.


row Methods

activate

Calls the Grid.setActiveRow on the current object.

Parameters
fireEvents

Boolean. Optional. Designates whether the UltraWebGrid should fire the normal events which should happen during row activation.

compare

Compares the row and the passed in row according to the row's band group by and/or sorted columns settings. If the row is the group by row, the grouped by column's compareRows method is called. Otherwise the two rows are compared cell by cell for all sorted columns of the band the row belongs to.

Parameters
row

Object. The row to compare to.

Returns

0 if the rows are equal. Less than 0 if the row is less than the passed in row. Greater than 0 if the row is greater than the passed in row.

deleteRow

Deletes the row from the rows collection if deletion is allowed by the UltraWebGrid.

editRow

This method is used to start utilizing the RowEditTemplate to edit the row.

Parameters
force

Boolean.

endEditRow

This method is utilized when using the RowEditTemplate for editing. It is called to close the Template and move the values from the Edit Template to the source row.

Parameters
saveChanges

Boolean. Optional. Designates whether to close the EditTemplate and move the values from the EditTemplate back into the UltraWebGrid.

find

The find method allows the UltraWebGrid to scan its cells contents searching for a particular string series. The method targets text of the cells rather than value, that makes a difference when numeric cells reflect a text of its column's value list or WebCombo. Hidden columns are omitted.

Parameters
re

String. The expression being sought in the UltraWebGrid.

back

Boolean. Optional. Designates whether the search should be forward or backward.

searchHiddenColumns

Boolean. Whether or not to include hidden columns in the find operation.

Returns

Object. The first row object that meets the criteria of the search.

findNext

The findNext method allows the UltraWebGrid to scan it's cells contents searching for a particular string series.

Parameters
re

String. The expression being sought in the UltraWebGrid.

back

Boolean. Optional. Designates whether the search should be forward or backward.

Returns

Object. The next row object that meets the criteria of the search.

getCell

Returns the cell located by the index parameter.

Parameters
index

Number. The index of the cell from the row.

Returns

Object. The client side Cell object that represents the cell at the index requested.

getCellByColumn

Attempts to locate a cell object given the column that the cell is part of.

Parameters
col

Object. The column that the cell corresponds to.

Returns

Object. The cell from the column of the given column.

getCellElements

Returns an array of HTML elements of the cells of the row. Can be useful when the grid has fixed columns and cells of a row cannot be accessed in a straight forward manner.

Returns

Array. Collection of HTML elements of the row's cells.

getCellFromKey

Attempts to locate a cell object given the key of the column that the cell is part of.

Parameters
key

String. The key of the column that the cell corresponds to.

Returns

Object. The cell from the column of the given key value.

getChildRow

Attempts to retrieve an child row from a given index.

Parameters

Number. The index of the child row to retrieve.

Returns

Object. The child row at the index provided.

getChildRows

Returns the collection of child rows for the row.

Returns

Object. A collection of Rows.

getDataKey

Returns an array of the data keys associated with the row.

Returns

Array. Data keys associated with the row. Null if no DataKeyField is set off of the band object.

getExpanded

Returns the expanded state of the row.

Returns

Boolean. True if the row is expanded

getFirstRow

Returns the first row of the current rows parent collection.

Returns

Object. The first row of the rows collection that this row belongs to.

getHidden

Returns whether or not the Row is visible or not.

Returns

Boolean. True if the row is hidden.

getIndex

Gets the row index.

Returns

Returns the row's index within its rows collection.

getLeft

Returns the Left coordinate for the row's HTML representation

Returns

Number. The Left value of the Row.

getLevel

Gets the level of the row. The level is an array of indexes of the row and its parent rows.

Parameters
s

Boolean. True indicates that the level needs to be returned as a string of the indexes separated by the underscore sign '_'. No value or false makes the method to return an array of the indexes.

Returns

Object. An array if no paramater or false is passed in. The array represents the row's parent rows indexes starting from the oldest plus the row's index within its own rows collection. String. Underscore sign separated string of the parent rows indexes and the row's index if the parameter passed into the method is true.

getNextRow

Retrieves the next visible sibling after this row in the rows collection

Parameters
addRow

Boolean. Defines if the add new row should be considered as a row while using the method.

Returns

Object. The visible row after to this with respect to index, null if no row meets this criteria.

getNextTabRow

Thsi method returns the next row in the tab order.

Parameters
shift

Boolean. If True the search moves to records prior to the current row.

ignoreCollapse

Boolean. If True, search will look into and open child row islands for a suitable row.

getPrevRow

Retrieves the first visible sibling before this row in the rows collection

Parameters
addRow

Boolean. Defines if the add new row should be considered as a row while using the method.

Returns

Object. The visible row prior to this with respect to index, null if no row meets this criteria.

getRowNumber

Returns row number if row numbering is enabled.

Returns

String. Row number from the row selector if any. Empty string if row numbering is disabled.

getSelected

Returns the row's current selection state.

Returns

Boolean. True if the row is selected.

getTop

Returns the Top coordinate for the row's HTML representation

Returns

Number. The Top value of the Row.

isActive

Returns whether or not the row is the ActiveRow in the UltraWebGrid.

Returns

Boolean. True if the row is currently the ActiveRow of the UltraWebGrid.

processUpdateRow

Finalizes updating of the row, fires client side events to support update row, and initializes server response if applicable.

Returns

Boolean. True if the update was cancelled along the processing tree.

Remarks
The method can be called in certain circumstances to initiate XmlHTTP request to the server with updated information of the row. Usually this request is sent automatically once the focus leaves this row. It is appropriate to call the method if there is only one row in the grid or the row was updated externally.

remove

This method removes the Row object from the Rows collection.

Parameters
fireEvents

Boolean. True if the events should be fire for this operation.

Returns

Boolean. True if the remove was cancelled.

scrollToView

This method brings the row into the visible area of the UltraWebGrid.

select

Not for public use. This method is used internally to select rows in the UltraWebGrid.

Parameters
selFlag

Boolean. True if the row is to be selected.

fireEvent

Boolean. Optional. True if the events of selection should be fired for this action.

Remarks
It is preferable that the row.setSelected is used instead of this method.

setExpanded

Expand or collapses the row

Parameters
expand

Boolean. True if the row is to be expanded. False to collapse.

setHidden

Sets the row visiblity.

Parameters
h

Boolean. True to hide row.

setSelected

Selects the row in the collection if rows can be selected. If SelectType is Single then this also deselects all rows prior to selection of a new row.

Parameters
select

Boolean. True if the row is to be selected.

toggleRow

Changes the current row's expansion state from true to false or from false to true.


row Properties

Band

Object. The band reference.

ChildRowsCount

Number. Indicates the child rows count.

DataKey

String. The DataKey of the row as it was passed down from the server. Compound data key is joined by the '\x07' character. This property should be considered a read only property on the client as changing the value could have unintended consequences.

Element

Object. The HTML element associated with the row.

Expandable

Boolean. Indicates if the row is expandable, that is the plus sign is rendered to the client. Changing the property on the client does not change the row's behavior and/or appearance, it is for informational purpose only.

Expanded

ObsoleteReturns the expanded state of the row.

FirstRow

Object. Holds the first child row's HTML element object reference.

gridId

String. The Id of the Grid that this Row belongs.

GroupByRow

Boolean. Indicates if the row is group by row. Changing the property on the client does not change the row's behavior and/or appearance, it is for informational purpose only.

GroupColId

String. Id of the column the row's owner collection is grouped by. Null if the rows collection is not grouped.

Id

String. The Row's Id.

nfElement

Object. HTML element of the non-fixed part of the row.

Node

Object. The XML node associated with the row if the XML rendering is enabled.

OwnerCollection

Object. The reference to the owner collection.

ParentRow

Object. The reference to this row's parent row, or null if the row has no parent row.

Type

String. Type of the client side object. That is "row" for the row object.

VisChildRowsCount

Number. The count of visible child rows.