procedure TForm4.DBGrid4TitleClick(Column: TColumn);
begin
with ryADOTable1 do
begin
if DBGrid1Boolean then
TADOTable(ryADOTable1).Sort := Column.FieldName + ' DESC'
else
TADOTable(ryADOTable1).Sort := Column.FieldName;
DBGrid1Boolean := not(DBGrid1Boolean);
end;
end;
procedure TForm1.DBGrid1TitleClick(Column: TColumn);
var DBGrid1Boolean:Boolean;
begin
with ryADOTable1 do
begin
if DBGrid1Boolean then
TADOTable(ryADOTable1).Sort := Column.FieldName + ' DESC'
else
TADOTable(ryADOTable1).Sort := Column.FieldName;
DBGrid1Boolean := not(DBGrid1Boolean);
end;
end;