Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
"The specified Visual is not an ancestor of this Visual" error in XamDataGrid when expanding/collapsing related child records
posted

After upgrading from WPF 20142.2081 to WPF 20142.2178 SR, which was required to fix memory leaks with the XamComboEditor, we are now experiencing the below error when expanding/collapsing related child records in the XamDataGrid.

Message: The specified Visual is not an ancestor of this Visual.
Exception Type: System.InvalidOperationException
Stack Trace:   at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform)
   at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor)
   at Infragistics.Windows.DataPresenter.DataRecordPresenter.CalculateCellAreaAutoFitExtent(RecordPresenter rp, Boolean isAutoFitWidth)
   at Infragistics.Windows.DataPresenter.DataRecordPresenter.UpdateAutoFitPropertiesHelper(RecordPresenter rp)
   at Infragistics.Windows.DataPresenter.DataRecordPresenter.UpdateAutoFitProperties()
   at Infragistics.Windows.DataPresenter.RecordPresenter.OnLayoutUpdated()
   at Infragistics.Windows.DataPresenter.DataPresenterBase.ProcessLayoutUpdatedCallbackList(Object sender, EventArgs e)

I have reviewed and compared the source code for 20142.2178 SR and the following change appears to be the cause of the error:

            // AS 2/26/15 TFS185805
            // TranslatePoint will translate to the screen and then back down to the target element. Since there
            // is a scale to 0, the elements will be considered in the same location.
            //
            //Point pt = isScaled ? new Point() : cellPanel.TranslatePoint(new Point(0, 0), clipToElement);
            Point pt = isScaled ? new Point() : cellPanel.TransformToAncestor(clipToElement).Transform(new Point());

Please could you investigate this?

Thanks in advance.

Parents Reply Children
No Data