Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Implement a custom drop-down editor with TreeView as PopupContent

$
0
0

Show how to implement a custom ComboBoxEdit with TreeView as a PopupContent and use it inside DXGrid as a custom column.


Update (13.1 version):


We've modified this code example by using the DevExpress control version 13.1. There is no need to create custom classes to resolve this problem.

You can accomplish this task by using the Grid control in the TreeView mode as a popup content template of the LookUpEdit control.

This way is more efficient and clear than the way used in this example for old versions of DevExpress controls.


Here is a snippet of the markup file:

[XAML]
<dxg:LookUpEditName="lookUpEdit"VerticalAlignment="Top"Width="350"Margin="50,37,67,0"DisplayMember="Name"><dxg:LookUpEdit.PopupContentTemplate><ControlTemplate><dxg:GridControlx:Name="PART_GridControl"AutoGenerateColumns="AddNew"><dxg:GridControl.Columns><dxg:GridColumnFieldName="Name"Header="Employee Name"/><dxg:GridColumnFieldName="Position"/><dxg:GridColumnFieldName="Department"/></dxg:GridControl.Columns><dxg:GridControl.View><dxg:TreeListViewName="treeListView1"AutoWidth="True"KeyFieldName="ID"ParentFieldName="ParentID"TreeDerivationMode="Selfreference"/></dxg:GridControl.View></dxg:GridControl></ControlTemplate></dxg:LookUpEdit.PopupContentTemplate></dxg:LookUpEdit>


Example Comments

Added By: Rob Hoglund @ CDW at: 6/12/2013 10:48:00 PM    

This example doesn't work with version 12.1.6.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>