用过ExpressQuantumGrid 4.5.2 的大虾们,
如何在 TcxGrid 中嵌入一个TDBedit控件??
就是当 TcxGrid 处于 Edit 状态时,嵌入一个 TDBedit 进行
编辑。没有焦点是不显示 TDBedit ??
就是类似于在DBGrid 中嵌入一个 DBComboBox1 一样啊!
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if (Field.FieldName = DBComboBox1.DataField ) then
begin
DBComboBox1.Left := Rect.Left + DBGrid1.Left;
DBComboBox1.Top := Rect.Top + DBGrid1.top;
DBComboBox1.Width := Rect.Right - Rect.Left;
DBComboBox1.Height := Rect.Bottom - Rect.Top;
DBComboBox1.Visible := True;
end;
end;
如何在 TcxGrid 中嵌入一个TDBedit控件??
就是当 TcxGrid 处于 Edit 状态时,嵌入一个 TDBedit 进行
编辑。没有焦点是不显示 TDBedit ??
就是类似于在DBGrid 中嵌入一个 DBComboBox1 一样啊!
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if (Field.FieldName = DBComboBox1.DataField ) then
begin
DBComboBox1.Left := Rect.Left + DBGrid1.Left;
DBComboBox1.Top := Rect.Top + DBGrid1.top;
DBComboBox1.Width := Rect.Right - Rect.Left;
DBComboBox1.Height := Rect.Bottom - Rect.Top;
DBComboBox1.Visible := True;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货