S
shenli.chongqin
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我在双击点表格的第一行时他也排序,而不是我点标题他才排序。
我用网上找到代码var
sortstring:string; //排序列
begin
//进行排序
with Column do
begin
if FieldName = '' then
Exit;
case Title.SortMarker of
smNoneEh:
begin
Title.SortMarker := smDownEh;
sortstring := Column.FieldName + ' ASC';
end;
smDownEh: sortstring := Column.FieldName + ' ASC';
smUpEh: sortstring := Column.FieldName + ' DESC';
end;
//进行排序
try
ADOQuery2.Sort := sortstring //dataset为实际数据集变量名
except
end;
end;
end;}
我用网上找到代码var
sortstring:string; //排序列
begin
//进行排序
with Column do
begin
if FieldName = '' then
Exit;
case Title.SortMarker of
smNoneEh:
begin
Title.SortMarker := smDownEh;
sortstring := Column.FieldName + ' ASC';
end;
smDownEh: sortstring := Column.FieldName + ' ASC';
smUpEh: sortstring := Column.FieldName + ' DESC';
end;
//进行排序
try
ADOQuery2.Sort := sortstring //dataset为实际数据集变量名
except
end;
end;
end;}