F
fuxin198311
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TJHXXTJ.setehautosort(DBGridEH: TDBGridEH);
var i: integer;
begin
DBGridEH.OptionsEh := DBGridEH.OptionsEh +[dghAutoSortMarking];
DBGridEh.SortLocal := True;
DBGridEH.DataSource.Dataset.DisableControls;
for i := 0 to DBGridEH.Columns.Count - 1 do
begin
DBGridEH.Columns.Title.TitleButton := True;
DBGridEH.Columns.Title.Alignment := taCenter;
end;
DBGridEH.DataSource.Dataset.EnableControls;
end;
然后在窗体的显示调用 我用的是query组件
只显示箭头 为什么不排序呢
var i: integer;
begin
DBGridEH.OptionsEh := DBGridEH.OptionsEh +[dghAutoSortMarking];
DBGridEh.SortLocal := True;
DBGridEH.DataSource.Dataset.DisableControls;
for i := 0 to DBGridEH.Columns.Count - 1 do
begin
DBGridEH.Columns.Title.TitleButton := True;
DBGridEH.Columns.Title.Alignment := taCenter;
end;
DBGridEH.DataSource.Dataset.EnableControls;
end;
然后在窗体的显示调用 我用的是query组件
只显示箭头 为什么不排序呢