WPF多个接收器设置。不应在不同控件之间共享即时反馈源

时间:2014-08-22 14:51:12

标签: c# wpf devexpress devexpress-wpf

当我尝试给它两个GridControl

时,其中一个entityınstantfeedbackdatasour可用
System.Windows.Markup.XamlParseException occurred
  _HResult=-2146233087
  _message='DevExpress.Xpf.Grid.GridControl' initialization exception is returned.
  HResult=-2146233087
  IsTransient=false
  Message='DevExpress.Xpf.Grid.GridControl' initialization exception is returned.
  Source=PresentationFramework
  LineNumber=0
  LinePosition=0
  StackTrace:
       konum: System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
  InnerException: System.InvalidOperationException
       _HResult=-2146233079
       _message=Multiple receivers set. Instant Feedback source should not be shared between different controls.
       HResult=-2146233079
       IsTransient=false
       Message=Multiple receivers set. Instant Feedback source should not be shared between different controls.
       Source=DevExpress.Data.v14.1
       StackTrace:
            konum: DevExpress.Data.Async.Helpers.AsyncListServerCore.SetReceiver(IAsyncResultReceiver receiver)
            konum: DevExpress.Data.Async.Helpers.AsyncListServer2DatacontrollerProxy.SetReceiver(IAsyncResultReceiver receiver)
            konum: DevExpress.Data.Helpers.AsyncListWrapper..ctor(AsyncServerModeDataController controller, IAsyncListServer server)
            konum: DevExpress.Data.AsyncServerModeDataController.GetListSource()
            konum: DevExpress.Data.ServerModeDataControllerBase.OnDataSourceChanged()
            konum: DevExpress.Data.BaseGridController.SetDataSource(BindingContext context, Object dataSource, String dataMember)
            konum: DevExpress.Data.BaseGridController.SetDataSource(Object dataSource)
            konum: DevExpress.Xpf.Data.GridDataProvider.OnDataSourceChanged()
            konum: DevExpress.Xpf.Data.DataProviderBase.set_DataSource(Object value)
            konum: DevExpress.Xpf.Grid.DataControlBase.OnInitialized(EventArgs e)
            konum: System.Windows.FrameworkElement.TryFireInitialized()
            konum: System.Windows.FrameworkElement.EndInit()
            konum: DevExpress.Xpf.Grid.DataControlBase.EndInit()
            konum: MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
       InnerException: 

给出错误。

     <dxg:GridControl AllowLiveDataShaping="True" SelectionMode="Row" x:Name="G1"   EnableSmartColumnsGeneration="True" ItemsSource="{Binding Data, Mode=OneTime, Source={StaticResource EntityInstantFeedbackDataSource}}">

                                            <dxg:GridControl.Columns>
                                                <dxg:GridColumn FieldName="Tarih" Header="Tarhi" IsSmart="True" VisibleIndex="0">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:DateEditSettings Mask="g" MaskUseAsDisplayFormat="True"  />
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
                                                <dxg:GridColumn FieldName="isGiderildi" Header="Sorun Giderildi" IsSmart="True" VisibleIndex="1"/>
                                                <dxg:GridColumn FieldName="AlarmTipleri.Adi" Header="Sorun" IsSmart="True" VisibleIndex="2"/>
                                                <dxg:GridColumn FieldName="Kavsaklar.KavsakAdi" Header="Kavşak" IsSmart="True" VisibleIndex="3"/>
                                                <dxg:GridColumn FieldName="Aciklama"  Header="Açıklama" IsSmart="True" MinWidth="250" VisibleIndex="4"/>

                                            </dxg:GridControl.Columns>

                                            <dxg:GridControl.View>
                                                <dxg:TableView x:Name="DusukTableView" AllowPerPixelScrolling="True" ShowFilterPanelMode="Never" ShowGroupPanel="False"  ShowTotalSummary="True" AllowEditing="False"/>
                                            </dxg:GridControl.View>

                                        </dxg:GridControl>



  <dxg:GridControl AllowLiveDataShaping="True" SelectionMode="Row" x:Name="G2"   EnableSmartColumnsGeneration="True" ItemsSource="{Binding Data, Mode=OneTime, Source={StaticResource EntityInstantFeedbackDataSource}}">

                                            <dxg:GridControl.Columns>
                                                <dxg:GridColumn FieldName="Tarih" Header="Tarhi" IsSmart="True" VisibleIndex="0">
                                                    <dxg:GridColumn.EditSettings>
                                                        <dxe:DateEditSettings Mask="g" MaskUseAsDisplayFormat="True"  />
                                                    </dxg:GridColumn.EditSettings>
                                                </dxg:GridColumn>
                                                <dxg:GridColumn FieldName="isGiderildi" Header="Sorun Giderildi" IsSmart="True" VisibleIndex="1"/>
                                                <dxg:GridColumn FieldName="AlarmTipleri.Adi" Header="Sorun" IsSmart="True" VisibleIndex="2"/>
                                                <dxg:GridColumn FieldName="Kavsaklar.KavsakAdi" Header="Kavşak" IsSmart="True" VisibleIndex="3"/>
                                                <dxg:GridColumn FieldName="Aciklama"  Header="Açıklama" IsSmart="True" MinWidth="250" VisibleIndex="4"/>

                                            </dxg:GridControl.Columns>

                                            <dxg:GridControl.View>
                                                <dxg:TableView x:Name="DusukTableView" AllowPerPixelScrolling="True" ShowFilterPanelMode="Never" ShowGroupPanel="False"  ShowTotalSummary="True" AllowEditing="False"/>
                                            </dxg:GridControl.View>

                                        </dxg:GridControl>

作为entityınstantfeedbackdatasour如何连接到多个网格? 当我做的时候,我发现上述错误是怎么回事?

0 个答案:

没有答案