long GetRecordFromRow(ROWCOL nRow);
nRow
Specifies the row id.
A zero-based long number.
Returns the zero-based row index associated with a row. GetRecordFromRow calls GetRowIndex and converts the row id to a zero-based record index.
If you override OnLoadCellStyle (or any other methods where you connect the grid to your data source), you should always take care to de-reference the index associated with a row. This will make it possible to add support for sorting rows.
Delegates to CGXBrowserLayoutManager::GetRecordFromRow
This sample code shows you how you can use this method to dereference the original record associated with a row:
// determine the record for the row
long nRecord = GetRecordFromRow(nRow);
// now, I can seek to the record
GetDocument()->m_dbfile.Seek(nRecord);
CGXDBEGrid::GetRowIndex CGXDBEGrid::OnLoadCellStyle
Class Overview | Class Members