procedure TShortageGoodsFrm.StringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
{$J+}
const
vOldCol:Integer = -1;
{$J-}
var
vCol, vRow:Integer;
begin
if Button = mbRight then Exit;
TStringGrid(Sender).MouseToCell(X, Y, vCol, vRow);
if (vRow < 0) or (vRow >= TStringGrid(Sender).FixedRows) then Exit;
StringGridRowSort(TStringGrid(Sender), vCol, vOldCol = vCol);
if vOldCol = vCol then
vOldCol := -vOldCol else vOldCol := vCol;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
{$J+}
const
vOldCol:Integer = -1;
{$J-}
var
vCol, vRow:Integer;
begin
if Button = mbRight then Exit;
TStringGrid(Sender).MouseToCell(X, Y, vCol, vRow);
if (vRow < 0) or (vRow >= TStringGrid(Sender).FixedRows) then Exit;
StringGridRowSort(TStringGrid(Sender), vCol, vOldCol = vCol);
if vOldCol = vCol then
vOldCol := -vOldCol else vOldCol := vCol;
procedure TShortageGoodsFrm.StringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
{$J+}
const
vOldCol:Integer = -1;
{$J-}
var
vCol, vRow:Integer;
begin
if Button = mbRight then Exit;
TStringGrid(Sender).MouseToCell(X, Y, vCol, vRow);
if (vRow < 0) or (vRow >= TStringGrid(Sender).FixedRows) then Exit;
StringGridRowSort(TStringGrid(Sender), vCol, vOldCol = vCol);
if vOldCol = vCol then
vOldCol := -vOldCol
else vOldCol := vCol;还要怎么具体啊,哪里不清楚啊!