D
delphi3722
Unregistered / Unconfirmed
GUEST, unregistred user!
在dbgrideh 第一列加入checkbox,但checkbox总是不能选择!
ADOQuery1 locktype 为ltBatchOptimistic
SQL为 'select 0 as checkitem from table '
Gitem := DBGridEh1.Columns.Add;
Gitem.FieldName := 'checkitem';
Gitem.Title.Caption := '选择';
Gitem.Checkboxes:=true;
Gitem.ReadOnly:=false;
Gitem.KeyList.Add('0');
Gitem.KeyList.Add('1');
Gitem.Title.TitleButton := true;
Gitem.Title.Alignment := taCenter;
Gitem.Alignment := taLeftJustify;
Gitem.Width := 30;
ADOQuery1 locktype 为ltBatchOptimistic
SQL为 'select 0 as checkitem from table '
Gitem := DBGridEh1.Columns.Add;
Gitem.FieldName := 'checkitem';
Gitem.Title.Caption := '选择';
Gitem.Checkboxes:=true;
Gitem.ReadOnly:=false;
Gitem.KeyList.Add('0');
Gitem.KeyList.Add('1');
Gitem.Title.TitleButton := true;
Gitem.Title.Alignment := taCenter;
Gitem.Alignment := taLeftJustify;
Gitem.Width := 30;