We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Cannot find source for binding with reference : target element is 'MenuItem'

Thread ID:

Created:

Updated:

Platform:

Replies:

108643 May 4,2013 06:30 PM Aug 6,2015 09:55 AM WPF 3
loading
Tags: GridControl
Chaupin
Asked On May 4, 2013 06:30 PM

Hi,

I have many binding error with your grids :

...
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortAscending'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortAscending'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortDescending'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortDescending'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_MenuItem'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_MenuItem'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
....

Do you know how to solve this?

It happens on every grid that contains data before the rendering.

Thanks,
A

Rajasekar G [Syncfusion]
Replied On May 6, 2013 01:49 PM

Hi Chaupin,

 

Thank you for your update.

 

We are able to reproduce the issue .Could you please create new incident for this issue  through Direct Trac system and we will update the status of this through incident.

 

Direct Trac Link : https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

Please let us know If you have any questions.

 

Regards,

Raja sekar.G


ChristophBasedau
Replied On August 5, 2015 05:20 AM

Hi,

I have many binding error with your grids :

...
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortAscending'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortAscending'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortDescending'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_SortDescending'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_MenuItem'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='PART_MenuItem'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='AdvanceFilter'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment')
....

Do you know how to solve this?

It happens on every grid that contains data before the rendering.

Thanks,
A

Hi

i am experencing the same problem with a GridDataControl of SyncFusion version 11.
The error/warnings messages are exactely the same.
My assumption is that these errors come the control template of the grid columns - since the target element is a MenuItem and the names are PART_SortAscending, PART_SortDescending and AdvanceFilter.
And the reason must be that the itemssource is not completely rendered / bound / loaded in the moment the visual ancestor is searched.

I have round 30 of these warnings when loading and my task is to detect the reason for a anoying performance problem where the data is displayed 4-5 secs after the data is generated in the view model.
We deal with small data amounts only bout 10 rows are displayed in each grid!

One of my assumptions is tha the data binding warnings and errors could by the reason for the delay.

Is there a fix or workaround for this problem?
Would it help to load the data after the views is created?

Thx,
Chris

Jai Ganesh S [Syncfusion]
Replied On August 6, 2015 09:55 AM

Hi Chris,

Sorry for the inconvenience caused.

We are able to reproduce the reported binding errors in 11.1 version but it has been fixed in our latest version. So could you please upgrade our latest version 13.2 to resolve this binding errors.

Please let us know if you need further assistance.

Thank you,

Jai Ganesh S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;