关键属性设置:
AutoPopulateColumns="False" 取消自动填充列,默认是true
IsTextEditable="False" 不允许直接编辑
<dxg:GridControl x:Name="PART_GridControl"> 个性化GridControl,Name属性必须设置为“PART_GridControl”
<dxg:LookUpEdit
AutoPopulateColumns="False"
DisplayMember="Note"
EditValue="{Binding MatchedFunctionalID}"
IsTextEditable="False"
ItemsSource="{Binding SystemFunctionalList}"
SelectedIndexChanged="LookUpEdit_SelectedIndexChanged"
ValueMember="ID">
<dxg:LookUpEdit.PopupContentTemplate>
<ControlTemplate>
<dxg:GridControl x:Name="PART_GridControl">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="ID" Header="Object_ID">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock.Text>
<MultiBinding StringFormat="{}ASF.{0}">
<Binding FallbackValue="0" Path="RowData.Row.ID" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Name" Header="Name" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TreeListView
AllowBandMoving="False"
AllowColumnMoving="False"
AllowEditing="False"
AutoWidth="True"
KeyFieldName="ID"
ParentFieldName="PID"
ShowFilterPanelMode="Never"
VerticalScrollbarVisibility="Auto" />
</dxg:GridControl.View>
</dxg:GridControl>
</ControlTemplate>
</dxg:LookUpEdit.PopupContentTemplate>
</dxg:LookUpEdit>