This is a migrated thread and some comments may be shown as answers.

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

7 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 08 Sep 2016, 10:18 PM

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>

....


7 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 12 Sep 2016, 11:26 AM
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.
0
Pavel
Top achievements
Rank 1
answered on 26 Sep 2016, 06:51 PM

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.

0
Dilyan Traykov
Telerik team
answered on 27 Sep 2016, 01:08 PM
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 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.
0
Pavel
Top achievements
Rank 1
answered on 27 Sep 2016, 05:11 PM
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.
0
Dilyan Traykov
Telerik team
answered on 28 Sep 2016, 09:08 AM
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.
0
Pavel
Top achievements
Rank 1
answered on 20 Oct 2016, 11:15 PM
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.

0
Dilyan Traykov
Telerik team
answered on 24 Oct 2016, 01:49 PM
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!
Tags
GridView
Asked by
Pavel
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Pavel
Top achievements
Rank 1
Share this question
or