XamlParseException Cannot find source for binding with reference (BindingExpression:Path=IsPinned)

8 posts, 0 answers
  1. Pavel
    Pavel avatar
    6 posts
    Member since:
    Sep 2016

    Posted 08 Sep Link to this post

    I have the following exception popping up from time to time when I scroll fast or use sliders in RadGridView.

     

    Exception: Exception thrown: 'System.Xaml.XamlParseException' in #####.exe

    ("Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.GridView.GridViewRow', AncestorLevel='1''. BindingExpression:Path=IsPinned; DataItem=null; target element is 'GridViewPinButton' (Name=''); target property is 'IsPinned' (type 'Boolean')"). Exception thrown: 'System.Xaml.XamlParseException' in #####.exe ("Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.GridView.GridViewRow', AncestorLevel='1''. BindingExpression:Path=IsPinned; DataItem=null; target element is 'GridViewPinButton' (Name=''); target property is 'IsPinned' (type 'Boolean')") 80.33s  [15528] <No Name>

     

    I simply host RadGridView in UserControl:

     

        <telerik:RadGridView ItemsSource="{Binding #######}"
                             IsReadOnly="True"
                             RowIndicatorVisibility="Collapsed"
                             AutoGenerateColumns="False"
                             ShowGroupPanel="False"
                             GridLinesVisibility="Both"
                             ClipboardCopyMode="All"
                             SelectionMode="Extended"
                             FrozenColumnCount="1"
                             CanUserFreezeColumns="False"
                             Background="Transparent"
        >
            <telerik:RadGridView.Columns>

    ....


  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    370 posts

    Posted 12 Sep Link to this post

    Hello Pavel,

    I'm afraid that I'm unable to reproduce the described exception at my end. Could you please provide more details on the exact setup in which it occurs or ideally, send over a sample project for me to investigate?

    Thank you in advance for your cooperation on the matter.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Pavel
    Pavel avatar
    6 posts
    Member since:
    Sep 2016

    Posted 26 Sep in reply to Dilyan Traykov Link to this post

    Couldn't provide code.

    Will try to investigate. Do you have some extra diagnostics tracing/logs I can enable in component?

    This grid control is hosted inside UserControl which is in turn hosted in parent controls. Problem might be higher up.

  5. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    370 posts

    Posted 27 Sep Link to this post

    Hello Pavel,

    Unfortunately, without a sample project demonstrating the issue, I cannot give you any suggestions as to why it may be occurring, neither are there any tracing mechanisms available.

    Could you please clarify whether you're getting a binding error or an exception that causes your application to crash? If the latter is the case, please let me know whether you've instructed the Visual Studio debugger to stop execution when certain exceptions are thrown.

    I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Pavel
    Pavel avatar
    6 posts
    Member since:
    Sep 2016

    Posted 27 Sep in reply to Dilyan Traykov Link to this post

    I use VS2015 R3. With default values in all exception filters (other XAML controls don't throw any exceptions). I start this application from VS in debug mode.
  7. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    370 posts

    Posted 28 Sep Link to this post

    Hello Pavel,

    I'm attaching a sample project where I've tried to reproduce the exception based on the information you provided, but was, unfortunately, unable to do so.

    Could you please have a look at the attached project and, if possible, let me know how I can modify it so that it produces the exception you described?

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  8. Pavel
    Pavel avatar
    6 posts
    Member since:
    Sep 2016

    Posted 20 Oct in reply to Dilyan Traykov Link to this post

    Ooops. Misunderstood. Exception is actually an error from:

     

     PresentationTraceSources.DataBindingSource.Listeners

     

    Not a critical exception but an error nonetheless. It's not appearing in other views which use GridView so it might be related to some changes made somewhere else. I will investigate.

  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    370 posts

    Posted 24 Oct Link to this post

    Hello Pavel,

    Do let me know once you have gathered more information on the matter. I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top
UI for WPF is Visual Studio 2017 Ready