Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
'selectorArrow_Active' name cannot be found
posted

Hello
I am getting another business-critical and rather annoying error from the Infragistics XamDataGrid.
I use NetAdvantage for Win Client 2010 Volume 2.

The error occurs a little randomly, but I think I have isolated two scenarios:

1)
When the grid is within a TabControl and tab selection is changed

2)
When the DataSource bound collection is cleared or modified.

The error occurrs, but within the XamDataGrid control, so I have no possibility to make a breakpoint or pause VS2008 so I can change the code. Because error does not reflect any file and line number in the code.

Here is my XAML code for the grid.
 - The "DataSource" is bound to an ObservableCollection<Shipment>
 - The "ActiveDataItem is bound to a single Shipment-class

 <kwg:DataGrid DataSource="{Binding Items}"
                      ActiveDataItem="{Binding ActiveItem, Mode=TwoWay}"
                      Visibility="{Binding ContentVisibility}"
                      GridLayout="{Binding ShipmentsGridLayout, Mode=TwoWay}"
                      LayoutSavedCommand="{Binding GridLayoutSaveCommand}"
                      RefreshGridCommand="{Binding RefreshGridCommand}"
                      CommandParameter="shipment_overview"
                      Theme="Office2k7Silver"
                      Background="GhostWhite"
                      IsSynchronizedWithCurrentItem="True"
                      AutoFit="False"
                      AllowDrop="False">
            <kwg:DataGrid.FieldLayoutSettings>
                <kwg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton"
                                         AllowAddNew="False"
                                         AllowDelete="False"
                                         HighlightAlternateRecords="False"
                                         SelectionTypeRecord="Extended"
                                         SelectionTypeField="Extended"
                                         SelectionTypeCell="None"
                                         AutoGenerateFields="False" />
            </kwg:DataGrid.FieldLayoutSettings>
            <kwg:DataGrid.FieldLayouts>
                <idp:FieldLayout Key="Shipment">
                    <idp:FieldLayout.FieldSettings>
                        <kwg:FieldSettings AllowRecordFiltering="True"
                                           AllowGroupBy="True"
                                           AllowResize="True"
                                           AllowEdit="False"
                                           CellClickAction="SelectRecord"/>
                    </idp:FieldLayout.FieldSettings>
                    <idp:Field Name="CreatedDate" Converter="{StaticResource formatter}" ConverterParameter="\{0:yyyy-MM-dd hh:mm\}" Label="Created" Column="0" Visibility="Visible" Width="80">
                        <idp:Field.Settings>
                            <idp:FieldSettings EditAsType="{x:Type sys:String}"/>
                        </idp:Field.Settings>
                    </idp:Field>
                    <idp:Field Name="Assignmentid" Label="Assignmend Id" Column="1" Visibility="Visible" Width="150" />
                    <idp:Field Name="MovementReferenceNumber" Label="MRN" Column="2" Visibility="Visible" Width="80" />
                    <idp:Field Name="DeclarationType" Label="Declaration type" Column="3" Visibility="Visible" Width="80" />
                    <idp:Field Name="DeclarationStatus" Label="Status" Column="4" Visibility="Visible" Width="80">
                        <idp:Field.Settings>
                            <idp:FieldSettings>
                                <idp:FieldSettings.CellValuePresenterStyle>
                                    <Style TargetType="{x:Type idp:CellValuePresenter}">
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding Path=DataItem.DeclarationStatus}" Value="ERR">
                                                <Setter Property="Foreground" Value="Red"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </idp:FieldSettings.CellValuePresenterStyle>
                            </idp:FieldSettings>
                        </idp:Field.Settings>
                    </idp:Field>
                    <idp:Field Name="TotalNumberOfItems" Label="Total # of items" Column="5" Visibility="Visible" Width="80">
                        <idp:Field.Settings>
                            <idp:FieldSettings>
                                <idp:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type ide:XamCurrencyEditor}">
                                        <Setter Property="Format" Value=".###"/>
                                    </Style>
                                </idp:FieldSettings.EditorStyle>
                            </idp:FieldSettings>
                        </idp:Field.Settings>
                    </idp:Field>
                    <idp:Field Name="TotalNumberOfPackages" Label="Total # of packages" Column="6" Visibility="Visible" Width="80">
                        <idp:Field.Settings>
                            <idp:FieldSettings>
                                <idp:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type ide:XamCurrencyEditor}">
                                        <Setter Property="Format" Value=".###"/>
                                    </Style>
                                </idp:FieldSettings.EditorStyle>
                            </idp:FieldSettings>
                        </idp:Field.Settings>
                    </idp:Field>
                    <idp:Field Name="TotalGrossWeight" Label="Total gross weight" Column="7" Visibility="Visible" Width="80">
                        <idp:Field.Settings>
                            <idp:FieldSettings>
                                <idp:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type ide:XamCurrencyEditor}">
                                        <Setter Property="Format" Value=".###"/>
                                    </Style>
                                </idp:FieldSettings.EditorStyle>
                            </idp:FieldSettings>
                        </idp:Field.Settings>
                    </idp:Field>
                    <idp:Field Name="Declarant" Label="Declarant" Column="8" Visibility="Visible" Width="100" />
                    <idp:Field Name="PlaceOfLoading" Label="Place of load" Column="9" Visibility="Visible" Width="80" />
                    <idp:Field Name="PlaceOfUnloading" Label="Place of unload" Column="10" Visibility="Visible" Width="80" />
                    <idp:Field Name="Consignor" Label="Consignor" Column="11" Visibility="Visible" Width="100" />
                    <idp:Field Name="Consignee" Label="Consignee" Column="12" Visibility="Visible" Width="100" />
                    <idp:Field Name="NotifyParty" Label="Notify party" Column="13" Visibility="Visible" Width="100" />
                    <idp:Field Name="LodgingPerson" Label="Lodging person" Column="14" Visibility="Visible" Width="100" />
                    <idp:Field Name="Representative" Label="Representative" Column="15" Visibility="Visible" Width="100" />
                    <idp:Field Name="Carrier" Label="Carrier" Column="16" Visibility="Visible" Width="100" />
                    <idp:Field Name="CustomerId" Label="Customer Id" Column="17" Visibility="Visible" Width="150" />
                    <idp:Field Name="UserId" Label="User Id" Column="18" Visibility="Visible" Width="80" />
                    <idp:Field Name="LastChangedBy" Label="Last changed by" Column="19" Visibility="Visible" Width="80" />
                    <!--<idp:Field Name="AIVStatus" Label="AIV Status" Column="20" Visibility="Visible" Width="80" />-->
                </idp:FieldLayout>
            </kwg:DataGrid.FieldLayouts>
            <kwg:DataGrid.ContextMenu>
                <ContextMenu>
                    <MenuItem Uid="mp_cmiOpen" Name="cmiOpen" Header="Open" Command="{Binding OpenICSCommand}" IsEnabled="{Binding OpenICSIsEnabled}" FontWeight="Bold" />
                    <MenuItem Uid="mp_cmiNew" Header="New" IsEnabled="{Binding NewIsEnabled}">
                        <MenuItem Uid="mp_cmiNewENS" Name="cmiNewENS" Header="Entry Summary Declaration [ENS]" Command="{Binding NewENSCommand}" IsEnabled="{Binding NewENSIsEnabled}" />
                        <MenuItem Uid="mp_cmiNewEXS" Name="cmiNewEXS" Header="Exit Summary Declaration [EXS]" Command="{Binding NewEXSCommand}" IsEnabled="{Binding NewEXSIsEnabled}"  />
                    </MenuItem>
                    <MenuItem Uid="mp_cmiMake" Header="Make" IsEnabled="{Binding MakeIsEnabled}">
                        <MenuItem Uid="mp_cmiMakeAMD" Name="cmiMakeAMD" Header="Amendment [AMD]" Command="{Binding MakeAMDCommand}" IsEnabled="{Binding MakeAMDIsEnabled}" />
                        <MenuItem Uid="mp_cmiMakeARN" Name="cmiMakeARN" Header="Arrival Notification [ARN]" Command="{Binding MakeARNCommand}" IsEnabled="{Binding MakeARNIsEnabled}" />
                        <MenuItem Uid="mp_cmiMakeDIV" Name="cmiMakeDIV" Header="Diversion Request [DIV]" Command="{Binding MakeDIVCommand}" IsEnabled="{Binding MakeDIVIsEnabled}" />
                    </MenuItem>
                    <MenuItem Uid="mp_cmiDelete" Name="cmiDelete" Header="Delete" Command="{Binding DeleteICSCommand}" IsEnabled="{Binding DeleteICSIsEnabled}" />
                    <Separator/>
                </ContextMenu>
            </kwg:DataGrid.ContextMenu>
        </kwg:DataGrid>

  • 27093
    posted

    Hello,

     

    I have been looking into your issue and based on what I can make out form your description this seems very similar to an issue that is already fixed for the 10.2 version. I can suggest you download and install the latest available Service Release: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads and let me know if the issue still persists.

     

    Looking forward to hearing from you.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

     

  • 355
    posted

    Hello
    I just thought I'd provide the stack trace that leads to this error.

    The last Ifragistics method that is called is:
    Infragistics.Windows.DataPresenter.RecordSelector.OnActivated(RoutedEventArgs args)

    And I guess this is only for animating or drawing the selected row...or something like that.

    System.InvalidOperationException: 'selectorArrow_Active' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'.
       at System.Windows.Media.Animation.Storyboard.ResolveTargetName(String targetName, INameScope nameScope, DependencyObject element)
       at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
       at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
       at System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer)
       at System.Windows.Media.Animation.BeginStoryboard.Begin(DependencyObject targetObject, INameScope nameScope, Int64 layer)
       at System.Windows.Media.Animation.BeginStoryboard.Invoke(FrameworkElement fe, FrameworkContentElement fce, Style targetStyle, FrameworkTemplate frameworkTemplate, Int64 layer)
       at System.Windows.StyleHelper.InvokeEventTriggerActions(FrameworkElement fe, FrameworkContentElement fce, Style ownerStyle, FrameworkTemplate frameworkTemplate, Int32 childIndex, RoutedEvent Event)
       at System.Windows.StyleHelper.ExecuteEventTriggerActionsOnContainer(Object sender, RoutedEventArgs e)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at Infragistics.Windows.DataPresenter.RecordSelector.OnActivated(RoutedEventArgs args)
       at Infragistics.Windows.DataPresenter.RecordSelector.RaiseActivated(RoutedEventArgs args)
       at Infragistics.Windows.DataPresenter.RecordSelector.OnLoaded(Object sender, RoutedEventArgs e)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.StartDispatcherInBrowser(Object unused)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)