We're using XamDataGrid v11.2 and we get one BindingExpression path error for each XamDataGrid as it renders. The whole message is:
BindingExpression path error: 'FieldLayout' property not found on 'object' ''GridUserControl' (Name='')'. BindingExpression:Path=FieldLayout.AutoFitToWidth; DataItem='GridUserControl' (Name=''); target element is 'DataRecordPresenter' (Name=''); target property is 'NoTarget' (type 'Object')
The data context for the whole user control is pointing to our GridUserControl object and the XamDataGrid inherits that data context (we set the DataSource for the grid). The binding expression (FieldLayout.AutoFitToWidth) must be something internal to the XamDataGrid. I have searched our code completely (not case sensitive, not whole word, entire soluton, *.*) and there are no occurances of AutoFitToWidth (and any occurances of FieldLayout are not used in binding expressions).
Am I right that this is an internal issue with XamDataGrid v11.2? Is there anything I can do to get rid of this error (we log all binding errors and customers may be confused if they see this in our log)?
Thanks,
Mike
One of the triggers in the RecordPresenter derived elements (e.g. DataRecordPresenter) is using that path. The DataContext of the RecordPresenter is the associated Record however the DataContext probably isn't set until the prepare for the RecordListControl (as is common in ItemsControl implementations) but that is probably after the Panel has added the element to the visual tree so you're datacontext temporarily was applied to the container (e.g. the DataRecordPresenter in this case). We can change the triggers in an upcoming SR. If you need to address this for now you would need to provide a custom style for the DataRecordPresenter (and possibly other elements like SummaryRecordPresenter, etc.) where you change that trigger and add RelativeSource={RelativeSource Self}.You would need to take the style we provide in the DefaultStyles directory and use that as the starting point.
Thanks Andrew, for your very quick response.
Now that I have a reasonable explanation, I can wait for an SR. If our QA team, or any customers, notice the error message, I now have a solid explanation (and after all, everything is completely functional).
Hello Mike,
I have logged this with development under ID: 101136 and I have also created a support ticket on your behalf: CAS-83839-GQJDG2 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://ko.infragistics.com/Membership/MySupport.aspx
Normal 0 false false false EN-US X-NONE X-NONE
When you are planning to release the fix since we are having the same issue when we upgraded to WPF 11.2?
Hello,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to My IG \My Keys and Downloads.
I just thought I would pop in and mention that I have tested the SR and it does indeed solve the problem.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.