locked
VALUE DOES NOT FALL WITHIN THE EXPECTED RANGE RRS feed

  • Question

  • ...this may sound like a puzzler but here it goes:

    I have a Search screen with a modal window that contains a custom Silverlight map control and two buttons: OK and Cancel.  When I click the Cancel button, the modal window closes and after couple of seconds I get "value does not fall within the expected range" error. 

    The cancel method looks like this: 

    Private Sub CancelButton_Execute() 

    IsAllowClosing = True

      Me.CloseModalWindow("MyMap")
      Me.Refresh()

    End Sub

    This error pops up in the deployed app (in IE and Firefox, but not in Chrome!) as well as in Visual Studio 2013,

    Has anyone experienced it?  How do I go about troubleshooting it?  Any insight would be  appreciated

    Isahak


    • Edited by Isahak Friday, September 18, 2015 5:06 PM
    Friday, September 18, 2015 5:03 PM

Answers

  • Hi, try to do a refresh to the table directly, like table.refresh. I nerver use be.refresh.

    Sven Elm

    • Proposed as answer by Angie Xu Monday, October 5, 2015 8:42 AM
    • Marked as answer by Angie Xu Tuesday, October 6, 2015 8:15 AM
    Wednesday, September 23, 2015 4:49 AM

All replies

  • Hi,

    You could use the Developer Tools (F12) within your browser to check the Console to see if any errors are occurring.

    hope it helps.

    With regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 22, 2015 6:58 AM
  • The only error I see is this:

    Failed to load resource: the server responded with a status of 400 (Bad Request)
    http://.../desktopclient/Content/Images/user-logo.ico Failed to load resource: the server responded with a status of 404 (Not Found)

    but I don't see it's related to the problem I'm having with my Silverlight web app.  Do I need to run dev tools(F12) in the Visual Studio environment or from the published app?  Also, hitting F12 has no effect on the page, I had to open dev tools from the Chrome menu.


    Isahak

    Tuesday, September 22, 2015 8:19 PM
  • Remove the first and third line in your code and see what happens. Explain why you have to set isAllowClosing and refresh on the entire screen. It looks like a timeout issue or something else strange error.

    Sven Elm

    Tuesday, September 22, 2015 9:02 PM
  • Remove the first and third line in your code and see what happens. Explain why you have to set isAllowClosing and refresh on the entire screen. It looks like a timeout issue or something else strange error.

    Sven Elm


    I think the refresh causes some load issue due to something else in your code. It could be the custom control you are using.

    Sven Elm


    • Edited by Sven Elm Tuesday, September 22, 2015 9:06 PM
    Tuesday, September 22, 2015 9:05 PM
  • Hi Sven, the reason I use IsAllowClosing is to prevent the modal window from closing when users hit the enter key:

    PrivateSubMyModalDialog_Closing(sender AsObject, e AsCancelEventArgs)

      e.Cancel = Not IsAllowClosing

    End Sub

    And refreshing the search screen lets me re-set the custom map control bindings, because it is bound to the datagrid columns.  I have not figured out a more elegant way of doing it.

    If I remove those two lines of code as you suggested, the error is gone.  But then I'm left at the mercy of users.


    Isahak

    Tuesday, September 22, 2015 10:16 PM
  • Hi, try to do a refresh to the table directly, like table.refresh. I nerver use be.refresh.

    Sven Elm

    • Proposed as answer by Angie Xu Monday, October 5, 2015 8:42 AM
    • Marked as answer by Angie Xu Tuesday, October 6, 2015 8:15 AM
    Wednesday, September 23, 2015 4:49 AM