Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

When a grid is sorted by one or more columns, a newly added row by default is displayed at the bottom of the grid. You should re-apply the sorting rules to the grid after some rows have been added or removed:

CExtGridWnd & wndGrid = . . .
CExtGridDataProvider & _DataProvider = wndGrid.OnGridQueryDataProvider();
_DataProvider.SortOrderUpdate( true, &wndGrid );
_DataProvider.SortOrderUpdate( false, &wndGrid );