定位在第一行并显示内置编辑器

cxDBVerticalGrid1.FocusedRow := cxDBVerticalGrid1.Rows[0]; 
cxDBVerticalGrid1.ShowEdit;


procedure TFrm_luru.Read_fllawmd;
var
  I: Integer;
  AItem: TcxDBEditorRow;
begin
  ShowHourglassCursor;
  try
    cxDBVerticalGrid.BeginUpdate;
    try
      with cxDBVerticalGrid.DataController.DataSet do
        for I := 0 to FieldCount - 1 do
        begin
              AItem := TcxDBEditorRow(cxDBVerticalGrid.Add(TcxDBEditorRow));
              with AItem.Properties do
              begin
                    DataBinding.FieldName := Fields[I].FieldName;
                    Caption := DataBinding.DefaultCaption;
                           if Fields[I].DataType=FtMemo then
                                 begin                                  EditPropertiesClassName:='TcxBlobEditProperties';
                                 end;
                              if Fields[I].DataType=ftDataSet then
                              begin
                                   cds:=Tclientdataset.Create(application);
                                   cds.DataSetField:=TDataSetField(Fields[I]);
                                   cds.Active:=true;
                                   cds.Edit;
                                   EditPropertiesClassName:='TcxButtonEditProperties';
                                   TcxButtonEditProperties(EditProperties).OnButtonClick:=ButtonClickDemo;
                              end;   
              end;
               AItem.Visible := Fields[I].Visible;

end;
    finally
      vv.EndUpdate;
    end;
  finally
    HideHourglassCursor;
  end;
end;


cxDBVerticalGrid的更多相关文章

随机推荐

  1. Luogu5110 块速递推

    题面 题解 线性常系数齐次递推sb板子题 $a_n=233a_{n-1}+666a_{n-2}$的特征方程为 $$ x^2=233x+666 \\ x^2-233x+666=0 \\ x_1=\fra ...

  2. Python之subprocess模块、sys模块

    一.subprocess模块 # import os # os.system('tasklist') #类似cmd输入系统命令 ''' subprocess的目的就是启动一个新的进程并且与之通信. s ...

  3. How to implement a custom PropertyEditor so that it supports Appearance rules provided by the ConditionalAppearance module

    https://www.devexpress.com/Support/Center/Question/Details/T505528/how-to-implement-a-custom-propert ...

  4. monkey测试入门3

    本文要感谢一起战斗过的点时小伙伴,程童鞋 打开开始 输入cmd 看到它的目录地址 然后把adb压缩包解压到该地址 插入数据线 打开手机设置打开开发者选项 打开USB调试 右键点击我的电脑 选择管理 左 ...

  5. linux下ftp连接:530 Permission denied

    问题如下:[root@localhost apps]# ftp 10.xxx.xxx.xxxConnected to 10.xxx.xxx.xxx220 (vsFTPd 2.0.5)530 Pleas ...

  6. 使用着色器在WebGL3D场景中呈现行星表面地形

    实验目的:按照一定规律生成类地行星地表地形区块,并用合理的方式将地形块显示出来 涉及知识:Babylon.js引擎应用.着色器编程.正态分布.数据处理.canvas像素操作 github地址:http ...

  7. Python学习之路目录(收藏整理)

    目录 Python之路[第一篇]:Python简介和入门 Python之路[第二篇]:Python基础(一) Python之路[第三篇]:Python基础(二) Python之路[第四篇]:模块    ...

  8. golang slice使用不慎导致的问题

    原文链接 : http://www.bugclosed.com/post/16 背景 go语言中切片slice是方便且好用的强大数据结构,但是使用的时候需要注意,不然容易出问题,最近因为遇到了一个sl ...

  9. ossec安装

    安装 安装要求 对于Unix系统来说,OSSEC只需要GNU的make.gcc和libc.推荐使用OpenSSL,但仅属于一个可选项.而且,通常您只需在一个系统上做编译操作,然后将二进制程序复制到其他 ...

  10. exec命令详解

    基础命令学习目录首页 原文链接: exec: 在bash下输入man exec,找到exec命令解释处,可以看到有”No new process is created.”这样的解释,这就是说exec命 ...