Mini Kabibi Habibi
<local:GridDemoModule x:Class="GridDemo.InplaceLookUpEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
xmlns:local="clr-namespace:GridDemo"
xmlns:dxdemo="clr-namespace:GridDemo"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="800">
<local:GridDemoModule.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/GridDemo;component/ModuleResources/InplaceLookUpEditResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<dxdb:NWindDataLoader x:Key="NWindDataLoader" />
</ResourceDictionary>
</local:GridDemoModule.Resources>
<dxdb:DemoModuleControl>
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel MinWidth="250">
<dx:GroupFrame Header="Properties" Margin="0,0,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<dxe:CheckEdit Content="Show size grip" Grid.ColumnSpan="2" Grid.Row="0" Margin="0,0,0,4" Name="chkShowSizeGrip" IsChecked="True" />
<dxe:CheckEdit Content="Immediate pop-up" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,0,0,4" Name="chkImmediatePopup" IsChecked="True" />
<dxe:CheckEdit Content="Allow auto complete" Grid.ColumnSpan="2" Grid.Row="2" Margin="0,0,0,4" Name="chkAllowAutoComplete" IsChecked="True" />
</Grid>
</dx:GroupFrame>
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxg:GridControl Name="grid" ItemsSource="{Binding Orders, Source={StaticResource NWindDataLoader}}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="OrderID" Header="ID" Width="50" MinWidth="30" />
<dxg:GridColumn FieldName="CustomerID" Header="Customer" MinWidth="50" Width="180" HeaderTemplate="{StaticResource headerTemplate}">
<dxg:GridColumn.EditSettings>
<dxg:LookUpEditSettings ValueMember="CustomerID" DisplayMember="CompanyName" ItemsSource="{Binding Customers, Source={StaticResource NWindDataLoader}}" PopupContentTemplate="{StaticResource customerGridTemplate}" AutoPopulateColumns="False" IsPopupAutoWidth="False"
AutoComplete="{Binding Path=IsChecked, ElementName=chkAllowAutoComplete, Mode=TwoWay}"
ImmediatePopup="{Binding Path=IsChecked, ElementName=chkImmediatePopup, Mode=TwoWay}"
ShowSizeGrip="{Binding Path=IsChecked, ElementName=chkShowSizeGrip}"
>
</dxg:LookUpEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="EmployeeID" Header="Employee" MinWidth="50" HeaderTemplate="{StaticResource headerTemplate}">
<dxg:GridColumn.EditSettings>
<dxg:LookUpEditSettings ValueMember="EmployeeID" DisplayMember="LastName" ItemsSource="{Binding EmployeesNew, Source={StaticResource NWindDataLoader}}" PopupContentTemplate="{StaticResource employeeGridTemplate}" AutoPopulateColumns="False" IsPopupAutoWidth="False"
AutoComplete="{Binding Path=IsChecked, ElementName=chkAllowAutoComplete, Mode=TwoWay}"
ImmediatePopup="{Binding Path=IsChecked, ElementName=chkImmediatePopup, Mode=TwoWay}"
ShowSizeGrip="{Binding Path=IsChecked, ElementName=chkShowSizeGrip}">
</dxg:LookUpEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="OrderDate" MinWidth="30" />
<dxg:GridColumn FieldName="RequiredDate" MinWidth="30" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView Name="view" AutoWidth="true" />
</dxg:GridControl.View>
</dxg:GridControl>
</dxdb:DemoModuleControl>
</local:GridDemoModule>