新建一张表  C

a   int   

b   string

form中添加:

组件     名字

dbgrid  dbgrd1

button  btn1

checklist  chklst1

第一步:

连接dbgrid到表;

sql :  select * from C;

第二步:

button事件中;添加代码

begin
for i := 0 to dbgrd1.Columns.Count - 1 do
chklst1.Items.Add(dbgrd1.Columns[i].FieldName);
end;

完成。

相关文章:

  • 2021-11-13
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
相关资源
相似解决方案