惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - ypq

cxGrid让指定的某行自动呈选选中的状态 VMware Esxi5.5中嵌套虚拟机的网络设置方法 SQLServer (2005/2008) 日志清理方法 关于Delphi cxGrid主从表中从表只能编辑第一条记录的问题 行字段值拼接成字符串 关于cxGrid选中行操作关联数据集的一种方法 安全释放 TreeView的DATA! delphi中遍历枚举类型的方法 oracle临时表的两种方式 关于PLSQL的存储过程参数 创建variant二维数组 数据库表行转列,列转行终极方案(转) kav 优化设置(转) - ypq - 博客园 [转载]oracle备份与恢复精华资料 ASP.NET学习线路(转) MS-SQLSERVER--错用了LEN()函数 反向解析(PTR)(转): 域名”A记录,MX记录,CNAME记录,TTL值,URL转发”解释 开博了!
控制cxGrid 主从表的明细只展开一个
ypq · 2014-11-14 · via 博客园 - ypq
procedure TForm.ADetailDataControllerCollapsing(
  ADataController: TcxCustomDataController; ARecordIndex: Integer;
  var AAllow: Boolean);
var
  I: Integer;
  C: Integer;
begin
  AAllow := False;
  C := 0;
  for I := 0 to ADataController.RecordCount - 1 do
  begin
    if ADataController.GetDetailExpanding(I) then
      Inc(C);
    if C > 1 then
      AAllow := True;
  end;
end;


procedure TForm.ADetailDataControllerExpanding(
  ADataController: TcxCustomDataController; ARecordIndex: Integer;
  var AAllow: Boolean);
begin
  ADataController.CollapseDetails;
end;

procedure TForm.FormCreate(Sender: TObject);
begin
  inherited;
  //控制只展开一个明细
  cxGridVMain.DataController.OnDetailExpanding := ADetailDataControllerExpanding;
  cxGridVMain.DataController.OnDetailCollapsing := ADetailDataControllerCollapsing;

end;

posted @ 2014-11-14 13:23  ypq  阅读(1525)  评论()    收藏  举报