How can I sort a CGXBrowserGrid, CGXDaoGrid or CGXODBCGrid?
If you want to sort a DAO recordset, you might call
CDaoRecordset* pSet = OnGetRecordset();
pSet->m_strSort = "[GradYear]";
Requery();
Redraw();
If you want to sort an ODBC recordset, you might call
CRecordset* pSet = OnGetRecordset();
pSet->m_strSort = "[GradYear]";
Requery();
Redraw();
If you want to sort other external data sources, you should take a look at the DbfBrows sample (dbfbrvw.cpp). This provides a routine that lets you sort a dbase file or any other grid contents.