Description:
I wish to show different in-place editors in the same TreeList column. However, the column's ColumnEdit property allows me to set only a single instance of a RepositoryItem. Is there a way to achive what I described?
Answer:
Applies to:
XtraGrid, XtraTreeList, XtraVerticalGrid
You should create the repositoryItemCheckBox in the TreeList and use the TreeList.CustomNodeCellEdit event to define which editor must be used in a particular cell. You can identify which cell is being processed by using the e.Column and e.Node parameters. We also advise that you review the TreeList.CustomNodeCellEdit Event topic in the XtraTreeList help.
The same feature can be also implemented in the XtraGrid and XtraVerticalGrid. In the first case, you need to use the GridView.CustomRowCellEdit event, in the second - the VGridControl.CustomRecordCellEdit event. Here are the links to the appropriate topics:
GridView.CustomRowCellEdit Event
VGridControl.CustomRecordCellEdit Event
To create a copy of your default RepositoryItem, please use its Clone method.
See Also:
DevExpress WinForms Cheat Sheet - Replace Default Cell Editors
How to use a combo box whose choices are different for each cell in the grid
Assigning Editors to Individual Cells
A1091
A2815
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Links are broken, this article is also 9 years old, perhaps an update/spring clean is in order :)
Hi Paul,
Thank you for your message. We greatly appreciate your assistance in improving our help articles. I have updated the links in this topic and changed the old events' names to the actual ones.
Feel free to contact us if you have further difficulties. We are happy to help you at any time.