<< Return to Main Index

< Return to Class Index

CGXDBEGrid::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 de-reference the index associated with the specified row. This method adds support for rearranging rows in the grid. The return value is one-based.

The implementation retrieves the index from the m_awRowIndex array maintained in the CGXDBEParam 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.

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

Delegates to CGXBrowserLayoutManager::GetRowIndex.

See Also

CGXDBEGrid::GetRecordFromRow CGXDBEParam

CGXDBEGrid 

Class Overview | Class Members