procedure   <Form>.<cxGrid>Enter(Sender:   TObject);   
  var   
      View:   TcxGridDBTableView;   
  begin   
      View   :=  TcxGridDBTableView((Sender   as   TcxGrid).FocusedView);   
      if   View.DataController.DataSet.IsEmpty   then   
      begin      
    View.DataController.DataSet.Append;   
    View.Controller.EditingController.ShowEdit;   
      end;   
 end;

posted on 2011-03-27 23:52  fyen  阅读(366)  评论(0编辑  收藏  举报