Error on ContextMenu: value does not fall within the expected range

13 posts, 0 answers
  1. Michael Maddux
    Michael Maddux avatar
    11 posts
    Member since:
    May 2010

    Posted 28 Jul 2010 Link to this post

    Hello,

    We are seeing this error only on some user's workstations.  We don't know what is different about these workstations - perhaps different Silverlight or IE settings?

    The error occurs during the following call (ContextMenu is an object of type RadContextMenu)....

    ContextMenu.GetClickedElement<

     

    GridViewCell>()

     


    The error message is "value does not fall within the expected range"

    Here is the stack trace...

       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
       at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
       at System.Windows.UIElement.TransformToVisual(UIElement visual)
       at Telerik.Windows.Controls.ApplicationHelper.TransformToScreenRoot(UIElement target)
       at Telerik.Windows.Controls.VisualTreeHelperExtensions.GetElementsInHostCoordinates[T](UIElement subtree, Point position)
       at Telerik.Windows.Controls.VisualTreeHelperExtensions.GetElementsInScreenCoordinates[T](Point mousePosition, FrameworkElement rootVisual)
       at Telerik.Windows.Controls.VisualTreeHelperExtensions.GetElementsInScreenCoordinates[T](FrameworkElement relativeTo, Point mousePosition)
       at Telerik.Windows.Controls.RadContextMenu.GetClickedElement[T]()
       at Pmc.Controls.PmcGridView.ContextMenu_Opened(Object sender, RoutedEventArgs e)
       at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
       at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
       at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
       at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
       at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
       at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
       at Telerik.Windows.Controls.RadContextMenu.OnOpened(RadRoutedEventArgs e)
       at Telerik.Windows.Controls.RadContextMenu.OnPopupOpened(Object source, EventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)


    Thanks for your attention!

    Mike Maddux


  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 29 Jul 2010 Link to this post

    Hi Michael Maddux,

    Could you please share what is the exact version of the controls that you use? This problem appeared in older version of RadControls and it should works as expected in our latest release.You can also find attached project that works as expected with the latest version.


    All the best,
    Rosi
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Morgan McCollough
    Morgan McCollough avatar
    34 posts
    Member since:
    May 2010

    Posted 18 Aug 2010 Link to this post

    I work with Mike, and we are seeing this exact same error again with the 8/12 build of the 2010 Q2 release (2010.2.812.1040). Could this bug have crept back in again? Thanks!
  5. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 19 Aug 2010 Link to this post

    Hi Morgan McCollough,

    We had such issue with one of  the Latest Internal Builds but we fix it for the official 2010.Q2.SP1.
    Could you send us sample project that we can investigate?

    Regards,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Morgan McCollough
    Morgan McCollough avatar
    34 posts
    Member since:
    May 2010

    Posted 24 Aug 2010 Link to this post

    I added our context menu to a grid in one of your example projects in order to try and recreate this. I have not had luck yet, but I'll keep experimenting. I'm guessing it has something to do with the specific way we are using the grid. I'll try and make the sample as much like our actual app as possible as I have the time and post the project when I can reproduce it.

    The problem is actually intermittent on our production deploy. I was only able to reproduce it once or twice in my dev environment locally, so it has been hard to track down the exact conditions that cause it.
  7. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 26 Aug 2010 Link to this post

    Hi Morgan McCollough,

    Let us know when the repro project is ready.

    Sincerely yours,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Morgan McCollough
    Morgan McCollough avatar
    34 posts
    Member since:
    May 2010

    Posted 31 Aug 2010 Link to this post

    I think I finally have a version that reproduces the issue. It is a little unclear whether it is EXACTLY the same sequence of events that causes it on our production system. Anyway, it seems to have something to do with the presence of a row expansion panel. How can I send you the project?
  9. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 01 Sep 2010 Link to this post

    Hello Morgan McCollough,

    You have to open a support ticket in order to attach files.

    Greetings,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Prithvi
    Prithvi avatar
    2 posts
    Member since:
    Nov 2010

    Posted 17 Nov 2011 Link to this post

    We are also facing the same problem, not every time, but by following one particular process my silverlight application crashed.
    We are using an RadHtmlPlaceholder in one page. After making some changes in page if we are navigate to another page or main page without save changes which we have done, our application crashed with below error message.

    Error :

    [Window Title]
    Visual Studio Just-In-Time Debugger

    [Main Instruction]
    An unhandled exception ('Unhandled Error in Silverlight Application
    Code: 4004    
    Category: ManagedRuntimeError       
    Message: System.ArgumentException: Value does not fall within the expected range.
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
       at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
       at System.Windows.UIElement.TransformToVisual(UIElement visual)
       at Telerik.Windows.Controls.ApplicationHelper.TransformToScreenRoot(UIElement target)
       at Telerik.Windows.Controls.RadHtmlPlaceholder.OnLayoutUpdated()
       at Telerik.Windows.Controls.RadHtmlPlaceholder.<Init>b__14()     
    ') occurred in iexplore.exe [2252].

    The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?

    [V] View process details  [Yes, debug iexplore.exe] [No, cancel debugging]

    [Expanded Information]
    Process Name: C:\Program Files (x86)\Internet Explorer\iexplore.exe

    Do you have any idea why it happen? Because we are using RadHtmlPlaceholder in detail page and this error produce when we are navigating from detail page.....
  11. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Nov 2011 Link to this post

    Hello Prithvi,

    Which version of the controls you are using? Could you please try with the latest official version - Q3 2011 and let us know if that fixes the issue.

    Best wishes,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  12. Prithvi
    Prithvi avatar
    2 posts
    Member since:
    Nov 2010

    Posted 22 Nov 2011 Link to this post

    Hello Konstantina,

    Thanks for you quick reply.

    After posting our problem on Nov 17, 2011, we download latest build : RadControls_for_Silverlight4_2011_3_1116_Dev.msi and installed it. And our problem was solved, and application was running properly.

    But today we found same problem in other page for child window case. We are using child window for showing some detail using RadHtmlPlaceHolder control, when we close that child window we got same error again.

    So can you guide me that now what we should do in case of child window?
  13. Alan
    Alan avatar
    1 posts
    Member since:
    Nov 2011

    Posted 22 Nov 2011 Link to this post

    Old thread I know, but we find that this happens reliably under the following conditions:
    1.  Load some rows into the RadGrid and on the OnLoad event set the context menu programmatically via RadContextMenu.SetContextMenu().
    2. Set a filter on a column such that there aren't enough rows to fill up the entire grid.  That is, scroll bars should not appear.  This is the key step.  There must be an active column filter with some items filtered out and the rows must not span the entire height of the grid.
    3. Then right click on a row that has had a context menu set.
  14. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Nov 2011 Link to this post

    Hello Prithvi,

    We highly suggest you to use RadWindow instead of ChildWindow as a container for the RadHtmlPlaceholder.
    There are some known rendering issues when using ChildWindow which make it useless in such sceanarios.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner