■ LookUpEdit 엘리먼트를 사용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<Grid xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" dx:ThemeManager.ThemeName="Office2010Black"> <dxg:LookUpEdit x:Name="lookUpEdit" Width="150" Height="25" AutoPopulateColumns="False" ValueMember="CustomerID" DisplayMember="ContactName"> <dxg:LookUpEdit.StyleSettings> <dxg:SearchLookUpEditStyleSettings /> </dxg:LookUpEdit.StyleSettings> <dxg:LookUpEdit.PopupContentTemplate> <ControlTemplate> <dxg:GridControl Name="PART_GridControl"> <dxg:GridControl.Columns> <dxg:GridColumn FieldName="CompanyName" /> <dxg:GridColumn FieldName="ContactName" /> <dxg:GridColumn FieldName="ContactTitle" /> <dxg:GridColumn FieldName="City" /> </dxg:GridControl.Columns> <dxg:GridControl.View> <dxg:TableView /> </dxg:GridControl.View> </dxg:GridControl> </ControlTemplate> </dxg:LookUpEdit.PopupContentTemplate> </dxg:LookUpEdit> </Grid> |
▶ 예제 코드 (C#)
1 2 3 |
this.lookUpEdit.ItemsSource = new NorthwindDataSetTableAdapters.CustomersTableAdapter().GetData(); |