TDBGridEh 隐藏title,隐藏行线,竖线,搜索行的

dfm 布局文件中的


去掉dgtitles 设置为false dgindicator 为False 即可隐藏标题栏

datasource中的Dataset 可以使用 TMemTableEH 控件 作为数据源,里面定义好字段与数据
这种的就是写死在程序中不需要连接数据库

列内容 居中显示 
DBGridEh1.ColumnDefValues.Layout :=tlCenter; 

列显示行线的设置不显示设置为False
DBGridEh1.GridLineParams.DataHorzLines :=False;
DBGridEh1.GridLineParams.DataVertLines :=False;

//搜索行显示在DBGridEh1 下面 显示上一行,下一行DBGridEh1.HorzScrollBar.ExtraPanel.Visible 的这个属性
  if DBGridEh1.SearchPanel.Location = splGridTopEh then
  begin
    DBGridEh1.SearchPanel.Location := splHorzScrollBarExtraPanelEh;
    DBGridEh1.HorzScrollBar.ExtraPanel.Visible := True;
    Button6.Caption := 'FilterPanel in the Top (No)';
  end else
  begin
    DBGridEh1.SearchPanel.Location := splGridTopEh;
    DBGridEh1.HorzScrollBar.ExtraPanel.Visible := False;
    Button6.Caption := 'FilterPanel in the Top (Yes)';
  end;

object DBGridEh1: TDBGridEh
  Left = 5
  Top = 29
  Width = 137
  Height = 429
  Align = alLeft
  AutoFitColWidths = True
  Border.Color = clBtnShadow
  Border.EdgeBorders = [ebRight]
  Color = clBtnFace
  ColumnDefValues.Layout = tlCenter
  Ctl3D = True
  DataSource = DataSource1
  DynProps = <>
  Flat = True
  IndicatorOptions = []
  Options = [dgColumnResize, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
  ParentCtl3D = False
  ReadOnly = True
  RowHeight = 2
  RowLines = 2
  TabOrder = 2
  VertScrollBar.SmoothStep = True
  Columns = <
    item
      CellButtons = <>
      DynProps = <>
      EditButtons = <>
      FieldName = 'MenuName'
      Footers = <>
      Width = 149
    end>
  object RowDetailData: TRowDetailPanelControlEh
  end
end


 

  • 0
    点赞
  • 1
    收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

钱•多多

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值