مرتب سازی dbgrid دلفی
procedure TformResult.gridResultTitleClick(Column: TColumn);
begin
// User can sort the grid by clicking on any column's title
if DM.ADOSearch.Sort = Column.FieldName + ' ASC' then
DM.ADOSearch.Sort := Column.FieldName + ' DESC'
else
DM.ADOSearch.Sort := Column.FieldName + ' ASC';
end;