<< Return to Main Index

< Return to Class Index

CGXBrowserGrid::GetRowIndex

virtual ROWCOL GetRowIndex(ROWCOL nRow);

nRow

Specifies the row id.

Return Value

A ROWCOL index for the row.

Remarks

GetRowIndex returns the original row id for a given row. This original row id can be different from the given row when the row has been moved or the grid has been sorted.

GetRowIndex is called to dereference the index associated with the specified row. This method adds support for rearranging rows in the grid. The return value is one-based.

The base-class version retrieves the index from the m_awRowIndex array maintained in the CGXBrowseParam object.  This is sufficient in most cases, but in some special cases you may wish to maintain your personal index array or maybe even store the index array in a file. You can support these special scenarios by overriding this method.

CGXBrowserGrid also provides another method called GetRecordFromRow. GetRecordFromRow calls GetRowIndex and converts the row id to a zero-based record index.

See Also

CGXBrowserGrid::GetRecordFromRow CGXBrowseParam

CGXBrowserGrid

Class Overview | Class Members