Mini Kabibi Habibi
<local:GridDemoModule x:Class="GridDemo.WCFInstantFeedback"
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:wcfsc="clr-namespace:GridDemo.WcfSCService"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="800" UseGridControlWrapperAsDataContext="True">
<local:GridDemoModule.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/GridDemo;component/ModuleResources/WcfInstantFeedbackTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</local:GridDemoModule.Resources>
<dxdb:DemoModuleControl SupressGroupFramePaddingInOptions="False">
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel MinWidth="165" MaxWidth="230">
<local:InternetConnectionControl />
<dx:GroupFrame Header="Filter Criteria" Margin="0,0,0,12">
<dxe:ComboBoxEdit x:Name="filter" DisplayMember="DisplayValue" ValueMember="EditValue" IsTextEditable="False" EditValue="{Binding GridControl.FilterString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ShowNullTextForEmptyValue="False">
<dxg:CustomComboBoxItem DisplayValue="All" EditValue=""/>
<dxg:CustomComboBoxItem DisplayValue=".NET" EditValue="[TechnologyName] = '.NET'" />
<dxg:CustomComboBoxItem DisplayValue="Urgent" EditValue="[Urgent] = True"/>
</dxe:ComboBoxEdit>
</dx:GroupFrame>
<dxe:CheckEdit x:Name="UseExtendedDataQueryCheckEdit" Content="Extend Data Query" IsChecked="{Binding GridControl.DataContext.IsUseExtendedDataQuery, Mode=TwoWay}"/>
<TextBlock TextWrapping="Wrap" Margin="0,4,0,0">When this option is enabled, the grid uses an additional WCF Service method to speed up the performance of data management operations (grouping, sorting, filtering, etc).</TextBlock>
<dx:WcfInstantFeedbackDataSource Name="wcfInstantSource" KeyExpression="Oid" DataServiceContext="{Binding GridControl.DataContext.WcfSCService}" Query="{Binding Path=GridControl.DataContext.WcfSCService.SCIssuesDemo}" UseExtendedDataQuery="{Binding GridControl.DataContext.IsUseExtendedDataQuery}" />
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxg:GridControl Name="grid" ItemsSource="{Binding ElementName=wcfInstantSource, Path=Data}" SelectionMode="Row">
<dxg:GridControl.Columns>
<dxg:GridColumn x:Name="colId" FieldName="ID" Width="70" FixedWidth="True" AllowGrouping="False" AllowColumnFiltering="False"
AllowResizing="False" CellTemplate="{StaticResource idTemplate}" />
<dxg:GridColumn x:Name="colSubject" FieldName="Subject" Width="200" AllowGrouping="False" AllowColumnFiltering="False" />
<dxg:GridColumn x:Name="colTechnologyName" FieldName="TechnologyName" Width="60" Header="Technology" />
<dxg:GridColumn x:Name="colProductName" FieldName="ProductName" Width="120" Header="Product" AllowColumnFiltering="{Binding IsChecked, Converter={StaticResource BooleanToDefaultBooleanConverter}, ElementName=UseExtendedDataQueryCheckEdit}" AllowGrouping="{Binding IsChecked, Converter={StaticResource BooleanToDefaultBooleanConverter}, ElementName=UseExtendedDataQueryCheckEdit}"/>
<dxg:GridColumn x:Name="colStatus" FieldName="Status" FixedWidth="True" Width="60" AllowResizing="False" CellTemplate="{StaticResource statusTemplate}" />
<dxg:GridColumn x:Name="colCreatedOn" FieldName="CreatedOn" AllowGrouping="False" AllowColumnFiltering="False" AllowResizing="False" Width="90" FixedWidth="True" />
<dxg:GridColumn x:Name="colUrgent" FieldName="Urgent" FixedWidth="True" Width="70" AllowResizing="False"/>
</dxg:GridControl.Columns>
<dxg:GridControl.GroupSummary>
<dxg:GridSummaryItem FieldName="TechnologyName" SummaryType="Count" />
</dxg:GridControl.GroupSummary>
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
</dxg:GridControl.TotalSummary>
<dxg:GridControl.View>
<dxg:TableView x:Name="view" ShowFixedTotalSummary="True" WaitIndicatorType="Panel" ShowAutoFilterRow="True"
AutoWidth="True" NavigationStyle="Row" AllowEditing="False"/>
</dxg:GridControl.View>
</dxg:GridControl>
<i:Interaction.Triggers>
<i:EventTrigger EventName="BeforeModuleDisappear">
<i:InvokeCommandAction Command="{Binding ElementName=wcfInstantSource, Path=DisposeCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</dxdb:DemoModuleControl>
</local:GridDemoModule>