页面
<dsgc:DataSetListEntityControl x:Class="BMITQT.Quotation.QuotationComponentList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igDP="http://infragistics.com/DataPresenter"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:mgw="clr-namespace:Mg2.Windows;assembly=Mg2.Windows"
xmlns:dsgc="clr-namespace:BMITQT.BuziLogic;assembly=BMITQT.BuziLogic"
xmlns:mgc="clr-namespace:Mg2.Windows.Controls;assembly=Mg2.Windows"
xmlns:mig="clr-namespace:Mg2.Ig.Windows;assembly=Mg2.Ig.Windows"
xmlns:igEditors="http://infragistics.com/Editors"
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20" ></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Height="20" Background="White"></TextBlock>
<TextBlock Name="txtCaption" Grid.Column="1" Text=" Quotation Component" Grid.Row="0" Background="White"></TextBlock>
<mig:MigDataGrid Grid.Row="1" Grid.ColumnSpan="2" x:Name="grdQuotationComponent" Theme="Office2k7Black" MouseDoubleClick="grdQuotationComponent_MouseDoubleClick" InitializeRecord="grdQuotationComponent_InitializeRecord" CellUpdated="grdQuotationComponent_CellUpdated" CellActivating="grdQuotationComponent_CellActivating" GroupByAreaLocation="None">
<igDP:XamDataGrid.Resources>
<!-- This items provider is populated in the code-behind. -->
<igEditors:ComboBoxItemsProvider x:Key="StatusItemsProvider" />
<Style x:Key="StatusFieldStyle" TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsProvider" Value="{StaticResource StatusItemsProvider}" />
</Style>
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout >
<igDP:FieldLayout.Fields>
<igDP:Field Name="QuotationComponentId" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblQuotationComponentId}" Visibility="Collapsed">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="0"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="ComponentCode" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblComponentCode}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="ComponentTypeName" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblComponentTypeName}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="StatisticsTypeName" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblStatisticsTypeName}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="ComponentUnitName" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblUnit}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="ManufacturerName" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblManufacturer}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Specification" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblSpecification}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Price" Label="{StaticResource BMITQT.Module.ModuleComponent_ComponentCostList.Price}">
<igDP:Field.Settings>
<igDP:FieldSettings EditorStyle="{StaticResource StatusFieldStyle}" CellWidth="100" LabelWidth="100" CellValuePresenterStyle="{StaticResource EditCellStyle}" />
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Quantity" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblQuantity}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="True" EditAsType="{x:Type sys:Int32}" CellWidth="100" CellClickAction="EnterEditModeIfAllowed" CellValuePresenterStyle="{StaticResource EditCellStyle}" />
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Description" Label="{StaticResource BMITQT.Quotation.QuotationComponentList.lblDescription}">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" CellWidth="50" CellClickAction="SelectRecord"/>
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
<igDP:XamDataGrid.ContextMenu>
<ContextMenu Width="150" Background="WhiteSmoke" Margin="15">
<MenuItem Name="menuAdd" Margin="3" Click="menuAdd_Click" Header="{StaticResource UI.Common.ListWindow.Menu.Add}">
<MenuItem.Icon>