注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

海宏软件的个人主页

用机器解放人的双手

 
 
 

日志

 
 

TCxTreeList、TCxButtonEdit:不同Node设置不同Properties。  

2009-08-29 21:29:08|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

提问:

Created by DevExpress Team at 8/18/2009 5:47:58 AM

Thank you.
I just has a question:
1: In TCxTreeList, i add a column and it`s properties set to TCxButtonEditProperties.
2: now i add more Nodes below,
3: i want to control EVERY ButtonEdit properties of nodes, for example:
    buttonEdit in nodes[1] , i want to set readOnly to True;
    buttonEdit in nodes[2], i want to set readOnly to False;
 
i use delphi 7 and devExpress quantum grid 5,columns.components has nothing.
how ?
 
 
Reviewed by DevExpress Team at 8/18/2009 3:26:10 PM

 

---------------------------------

DevExpress的回复:
 
Processed (Insufficient Information) by DevExpress Team at 8/18/2009 3:33:01 PM

Hi Zhou,

To achieve the desired result, handle the column's OnGetProperties event.
For more information, please see the following KB articles:
How to provide different editors in a Grid column (Table View) or row (Card View)
How to vary the editor's settings in the cells of a Grid column (Table View) or row (Card View)

By the way, I see that your products list is empty. We'll be happy to help you, but we need to clarify your license information first. If you're a registered customer, please specify the Client Center account credentials you used to order and install our components. We will update our customer records.

Thanks
Dimitros
 

 

--------------------------------------

How to provide different editors in a Grid column (Table View) or row (Card View)

Article ID: K18139
Product Group: VCL
Product: ExpressQuantumGrid Suite
Version(s): 4, 5, 6
Updated: 9 六月 2009
Categories: n/a

Description

I have a Grid with a "Description" column. I want to have different editors in this column based on a cell's value. How to accomplish this?

Solution

The ExpressQuantumGrid allows you to implement the MultiEditors feature, i.e. provide different editors to display and edit cells within one item. To implement this, execute the following steps:

1. Create as many repository items as many different editors you need in a column. Use the TcxEditRepository component for this purpose.
2. Modify their properties according to your needs.
3. Handle the column's OnGetProperties event and pass the required editor properties to the AProperties var-parameter:

[Delphi]

DE<if ARecord.RecordIndex = 0 then
  AProperties := RepositoryItem1.Properties
else
  AProperties := RepositoryItem2.Properties;
DE<

[C++ Builder]

DE<if (ARecord->RecordIndex == 0)
  AProperties = RepositoryItem1->Properties
else
  AProperties = RepositoryItem2->Properties;
DE<

The attached sample illustrates this approach in action.

For more information, please read the "TcxCustomGridTableItem.OnGetProperties" topic in the ExpressQuantumGrid's documentation.
For a complete example, see the ColumnsMultiEditorsDemo.

  评论这张
 
阅读(1878)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017