码迷,mamicode.com
首页 > 数据库 > 详细

cxDBVerticalGrid

时间:2017-11-25 14:26:59      阅读:509      评论:0      收藏:0      [点我收藏+]

标签:add   cal   client   for   try   var   edr   binding   tcap   

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

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

标签:add   cal   client   for   try   var   edr   binding   tcap   

原文地址:http://www.cnblogs.com/railgunman/p/7894970.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!