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
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
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.
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
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
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.
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