+ -
当前位置:首页 → 问答吧 → 急~ dbgrid的picklist問題

急~ dbgrid的picklist問題

时间:2011-08-30

来源:互联网

下面是我的代碼,為什么沒有實現下拉菜單呢?缺少了什么東西嗎?要不要設置什么屬性值呢?急~
procedure TSPS_OrganizationInFormA.dbg_ass_workgroupColEnter(
  Sender: TObject);
begin
with ads_temp do
  begin
  if dbg_ass_workgroup.SelectedIndex=2 then
  begin
  Close;
  CommandText:=' select ''[''+REPLACE(class_code,'' '','''')+'']''+REPLACE(class_name,'' '','''') as group_type'
  +' from chd_code ';
  Open;
  dbg_ass_workgroup.Columns[2].PickList.Clear;
  while not Eof do
  begin
  dbg_ass_workgroup.Columns[2].PickList.Add(FieldbyName('group_type').AsString);
  next;
  end;
  end;
  end;
end;

作者: lian_tting   发布时间: 2011-08-30

热门下载

更多