cxgrid GridMode 等于 True 时的一些问题。

本文探讨了在使用GridMode时,数据控制器加载固定数量的数据集记录到内存的问题。详细介绍了GridModeBufferCount属性对记录数量的影响,并提供了一种优化方法来获取正确的记录总数,同时指出了在尝试从网格本身获取记录数时遇到的错误情况。

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

When using grid mode, the data controller loads a fixed number of dataset records into memory. The number of records to be loaded depends on the GridModeBufferCount property value. A user is permitted to perform data-related operations on the loaded records only." 
 
Hi 
I am using a bunch of bound grids which have non trivial queries and for some reason the automatic SQL record count embedded in the query component gives me garbage. One way to solve that is to go to the last record, then the first and use the dataset recordcount but it is a bit slow.
All these grids are in GridDBTableView1.DataController.DataModeController.GridMode := true;
I thought I could get the record count from the grid itself 
I tried
GridDBTableView1.itemcount > gives me 2 ?????
GridDBTableView1.DataController.RecordCount 
GridDBTableView1.ViewData.RecordCount
All of which gave me some WRONG values 
I am sure in one of those properties you must have the correct number, if it is the case be kind enough to let me know
Thank you & Regards 

当 GridMode = true 时, Grid.DataControl.RecordCount 只是dataset里一部分数量,这个数量行数多少取决于

GridModeBufferCount

转载于:https://www.cnblogs.com/starluck/p/4079272.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值