App crash in SFDataGrid on Resizing

Hi Team

We are using SFDataGrid for our client UWP Desktop App. We have requirement to resize a control view which has SFDataGrid to show list of user data.
Using ManipulationDelta, we are resizing the control view. At a certain point we are collapse and re showing the control. There we are getting app crash.

With the log we identified it was due to ColumnSizer property. We used Star for this to make it auto stretchable. By removing it, NOT getting app crash. But lost the alignment.

Please suggest us, how to resolve this. We need to make the layout auto stretchable. 

Looking forward for your response!

LOG:
[App.xaml.cs] [OnUnhandledException()] [LineNo:280]Unhandled Exception: System.Runtime.InteropServices.COMException: No installed components were detected.

Child collection must not be modified during measure or arrange.
   at Windows.UI.Xaml.Controls.Primitives.Popup.put_Child(UIElement value)
   at Syncfusion.UI.Xaml.Grid.ColumnSizerBase`1.MeasureTemplate(Size rect, Object record, GridColumnBase column, GridQueryBounds bounds, ContentPresenter ctrl)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.MeasureTemplate(Size rect, Object record, GridColumn column, GridQueryBounds System.Runtime.InteropServices.COMException (0x800F1000): No installed components were detected.

Child collection must not be modified during measure or arrange.
   at Windows.UI.Xaml.Controls.Primitives.Popup.put_Child(UIElement value)
   at Syncfusion.UI.Xaml.Grid.ColumnSizerBase`1.MeasureTemplate(Size rect, Object record, GridColumnBase column, GridQueryBounds bounds, ContentPresenter ctrl)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.MeasureTemplate(Size rect, Object record, GridColumn column, GridQueryBounds bounds)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.GetCellSize(Size rect, GridColumn column, Object data, GridQueryBounds bounds)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.GetCellWidth(GridColumn column)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.CalculateCellWidth(GridColumn column, Boolean setWidth)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.CalculateAutoFitWidth(GridColumn column, Boolean isAuto)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.GetColumnSizerWidth(GridColumn column, GridLengthUnitType columnSizer)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.SetSizerWidth(Double viewPortWidth)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.Refresh(Double AvailableWidth, Boolean needToInvalidateMeasure)
   at Syncfusion.UI.Xaml.Grid.GridColumnSizer.InitialRefresh(Double AvailableWidth, Boolean needToInvalidateMeasure)
   at Syncfusion.UI.Xaml.Grid.RowGenerator.ApplyColumnSizeronInitial(Double availableWidth)
   at Syncfusion.UI.Xaml.Grid.VisualContainer.MeasureOverride(Size constraint)
   at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
   at Syncfusion.UI.Xaml.Grid.SfDataGrid.MeasureOverride(Size availableSize)

3 Replies

SS Susmitha Sundar Syncfusion Team March 6, 2020 10:30 AM UTC

 
Thank you for using Syncfusion controls. 
 
We have checked your reported issue but unfortunately, we unable to replicate this from our end. We have checked with setting the ColumnSizer as Star and resizing and collapsing the SfDataGrid. But we did not get any crash from our end. 
 
We have tested with Syncfusion version 17.4.0.53. 
 
 
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details, 
 
·       SfDataGrid customization. 
·       Resizing code snippet. 
·       Issue reproducing video (if possible) 
  
It will be helpful for us to check on it and provide you the solution at the earliest.   
 
Regards, 
Susmitha s 



AE adel eddin November 25, 2021 04:44 AM UTC

I have had the same issue with most of the controls when opened in a second window (Yes you can open multiple windows in UWP apps). Just placing any of the controls on the second window causes most of the controls to cause a COM error. But this specific error occur if you are changing the Context binding in the LOADED method. I see this is the sfDatagrid trying to bind the column to a datatemplate and in the loaded method I changed the itemsource of the datagrid.

To solve the issue, make sure that your UI is fully visible and then alter/rebind the control (say in the GOTFOCUS)


Hope this helps

 



MA Mohanram Anbukkarasu Syncfusion Team November 26, 2021 06:37 AM UTC

Hi Adel, 

Thanks for your suggestion.  

Regards, 
Mohanram A. 


Loader.
Up arrow icon