哎我自己找到答案了. 在主从TableView中根据主TableView得到对应的从TableView var ADetailDC: TcxGridDataController; AView: TcxCustomGridTableView; begin with cxGrid1DBTableView1.DataController do ADetailDC := TcxGridDataController(GetDetailDataController(FocusedRecordIndex, 0)); AView := ADetailDC.GridView; end; 17)在主从表结构时,当点开“+”时怎样将焦点聚在相应主表的记录上? 解决: var HitTest: TcxCustomGridHitTest; procedure TColumnsShareDemoMainForm.tvProjectsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin // Note that the Sender parameter is a Site HitTest := (Sender as TcxGridSite).GridView.ViewInfo.GetHitTest(X, Y); // The point belongs to the [+]/[-] button area if HitTest is TcxGridExpandButtonHitTest then // Move focus to the record TcxGridExpandButtonHitTest(HitTest).GridRecord.Focused := True; end;