advstringgrid delphi ADVStringGrid怎么显示下拉列表?
delphi ADVStringGrid怎么显示下拉列表?让ADVStringGrid组件显示下拉列表,其步骤如下:1、设置DefaultEditor属性为 edComboList,或者 设置Edit
delphi ADVStringGrid怎么显示下拉列表?
让ADVStringGrid组件显示下拉列表,其步骤如下:
1、设置DefaultEditor属性为 edComboList,或者 设置EditorType为edComboList。
2、提供列表选项。即给ADVStringGrid的Combobox.Items属性赋值。示例代码如下:procedure TfrmGroupUp.grdGetEditorType(Sender: TObject ACol, ARow: Integer var AEditor: TEditorType)begin case ACol of 4: //第5列 begin AEditor := edComboList //下拉列表 grd.Combobox.Items := cbbFangShi.Items //动态设置下拉列表选项 end endend
DELPHI中,怎么把Stringgrid中的数据存到数据库里?
for i:=0 to stringgrid1.rowcount-1 do
begin
adoquery1.append
adoquery1.fieldbyname("字段名").asstring:=stringgrid1.cells[1,i]
........
adoquery1.post
end