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.

SfDatagrid crash after open in a Secondary Window

Thread ID:

Created:

Updated:

Platform:

Replies:

130089 Apr 20,2017 12:31 PM Apr 21,2017 09:28 AM UWP 1
loading
Tags: SfDataGrid
Ricardo
Asked On April 20, 2017 12:31 PM

Hello! 
I'm working with SfDataGrid It was working very good but with my new requirement I have to show the control in a new Window (Secondary Window) The first time I open the window the control works very well after I close the Window after I Open the Window again and I have this error from the control.

System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
   at Syncfusion.UI.Xaml.Grid.DataRowBase.MeasureElement(Size size)
   at Syncfusion.UI.Xaml.Grid.VisualContainer.MeasureRows()
   at Syncfusion.UI.Xaml.Grid.VisualContainer.MeasureOverride(Size constraint)

this is the code of my XAML

    <my:SfDataGrid
                AutoGenerateColumns="False"
                BorderBrush="Black"
                BorderThickness="1,0,0,0"
                ItemsSource="{Binding Appraisals, Mode=TwoWay}">
                <my:SfDataGrid.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="FontSize" Value="12" />
                    </Style>
                </my:SfDataGrid.Resources>
                <my:SfDataGrid.Columns>
                    <my:GridTextColumn
                        Width="60"
                        DisplayBinding="{Binding InternalIdentifier}"
                        HeaderText="Id"
                        TextAlignment="Center" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding ProductName}"
                        HeaderText="Tipo de avalúo"
                        TextAlignment="Left"
                        TextTrimming="WordEllipsis" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding Client}"
                        HeaderText="Cliente" />
                    <my:GridTextColumn
                        Width="130"
                        DisplayBinding="{Binding TypeOfPropertyName}"
                        HeaderText="Tipo de inmueble"
                        TextAlignment="Center" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding ControllerName}"
                        HeaderText="Controlador" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding ValuerName}"
                        HeaderText="Valuador" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding OwnerName}"
                        HeaderText="Propietario" />
                    <my:GridTextColumn
                        Width="150"
                        DisplayBinding="{Binding ApplicantName}"
                        HeaderText="Solicitante" />
                    <my:GridTextColumn
                        Width="100"
                        DisplayBinding="{Binding FinishDate}"
                        HeaderText="Fecha"
                        TextAlignment="Center" />
                    <my:GridTemplateColumn
                        Width="80"
                        HorizontalAlignment="Center"
                        AllowSorting="False"
                        HeaderText=" "
                        MappingName="Imprimir">
                        <my:GridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <AppBarButton
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Stretch"
                                    Icon="More">
                                    <AppBarButton.Flyout>
                                        <MenuFlyout>
                                            <MenuFlyoutItem
                                                Command="{Binding DataContext.CloneAppraisalCommand, ElementName=MainPage}"
                                                CommandParameter="{Binding}"
                                                Text="Duplicar" />
                                            <MenuFlyoutItem
                                                Command="{Binding DataContext.PrintAppraisalCommand, ElementName=MainPage}"
                                                CommandParameter="{Binding}"
                                                Text="Imprimir" />
                                        </MenuFlyout>
                                    </AppBarButton.Flyout>
                                </AppBarButton>
                            </DataTemplate>
                        </my:GridTemplateColumn.CellTemplate>
                    </my:GridTemplateColumn>
                </my:SfDataGrid.Columns>
            </my:SfDataGrid>

I hope anyone could help me.

Thank you!

Balamurugan Rajaraman [Syncfusion]
Replied On April 21, 2017 09:28 AM

Hi Ricardo 

Thank you for contact Syncfusion support. 

We have analyzed your query “Crashes while tried to load the SfDataGrid in Secondary window”. We are not able to reproduce the reported issue, it’s working fine in our side. We have attached the tested sample for your reference. Could you please revert us by modifying the sample to reported issue in our side. It will greatly helpful for us to analyze further. 

You can able to download the tested sample from the below link 


Regards, 
Balamurugan R 


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.

;