cxGrid的Row和Record的区别

本文详细介绍了cxGrid中数据控制器(DataController)的功能和使用方法,包括如何通过它进行数据检索和发布、应用分组、过滤及汇总计算等功能。同时,还讲解了视图控制器(Controller)的聚焦记录索引(FocusedRecordIndex)属性的区别及其应用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、默认、排序、过滤、分组,都相等,注意的是分组时取的是分组页面行数(即:分组都不展开就是分组数,展开的就是展开的+分组数)

   cxGrid1DBTableView1.ViewData.RowCount;
   cxGrid1DBTableView1.ViewData.RecordCount;


Note: Do not confuse the View  Controller.FocusedRecordIndex and DataController.FocusedRecordIndex properties. The former specifies the row index of the focused record, i.e. the record  visual position (this is equivalent to the Index property of the Controller.FocusedRecord object and to the TcxCustomDataController.FocusedRowIndex property). The latter specifies the record index of the focused record, i.e. the position of the record in the data controller/dataset (this is equivalent to the RecordIndex property of the Controller.FocusedRecord object).

with (Sender as TcxGridDBTableView).Controller do
    FocusedRowIndex := TopRowIndex;

TcxCustomGridTableView.DataController

TcxCustomGridTableView

Provides access to the data controller that manages the current View抯 data.

 

property DataController: TcxGridDataController;

 

Description

Use the DataController property to access the object managing the grid View's connection to a data store. A data controller object implements the retrieval and posting of data, applies grouping, filtering, and calculates summaries.


TcxCustomGridTableView.Controller

TcxCustomGridTableView

Provides access to the controller associated with the View.

 

property Controller: TcxCustomGridTableController;

 

Description

Use the Controller property to access the View抯 controller functionality. It enables you to do the following:

  • Control the editing of a record cell;

  • Set focus to a specific item (column in a Table View or card in a Card/Layout View) and record;

  • Start/cancel an incremental search;

  • Access the collection of selected records;

  • Perform scrolling;

  • Navigate records and items.

 

The TcxCustomGridTableController class provides properties and members common to both (Banded) Table Views and Card Views.

 

ReadOnly Property


(cxGrid1DBTableView1.Controller.FocusedRowIndex = cxGrid1DBTableView1.ViewData.RowCount - 1)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值