This is a migrated thread and some comments may be shown as answers.

[Solved] Browser Crashes on setting ItemsSource

3 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Liam
Top achievements
Rank 1
Liam asked on 26 Oct 2009, 12:49 AM
When I have a GridView, in a RadWindow, and I set ItemsSource for a second time, the browser (IE 7, 8, Firefox 3.5) will crash on XP SP2.  On Vista it appears to be ok.

Nulling all controls and re-openning the RadWindow does not work.

Any suggestions for working around this?

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 26 Oct 2009, 11:16 AM
Hi Liam,

Could you send us a small sample project that fully reproduces this behavior. Also, tell us the exact steps we need to take in order to reproduce the problem. We will debug it and hopefully find the reason for this weird behavior. Thank you in advance.

All the best,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Liam
Top achievements
Rank 1
answered on 26 Oct 2009, 11:27 PM
Hi,

It's a little difficult to get time to create a test project, but below are snippets from the relevant components.

1.  Control defintion

The control is split into 2 parts, a header with a query builder, and a body with the radgridview for the results. 

<UserControl x:Class="xxx.xxx.Client.Controls.EntitySelectionList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:radDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
             xmlns:local="clr-namespace:xxx.xxx.xxx.xxx"
    >
    <Grid x:Name="LayoutRoot" Background="White">
        <radDock:RadDocking>

            <radDock:RadSplitContainer Orientation="Vertical" InitialPosition="DockedTop" Height="100">
                <radDock:RadPaneGroup>
                    <radDock:RadPane>
                        <Grid Name="ManagementGrid" ShowGridLines="True">
                            <local:QueryBuilder Name="qb"></local:QueryBuilder>
                        </Grid>
                    </radDock:RadPane>
                </radDock:RadPaneGroup>
            </radDock:RadSplitContainer>

            <radDock:RadDocking.DocumentHost>
                <radDock:RadSplitContainer>
                    <radDock:RadPaneGroup>
                        <radDock:RadDocumentPane Name="DocumentPane1" >
                            <telerikGridView:RadGridView x:Name="gv" ColumnsWidthMode="Fill" ShowGroupPanel="False">
                            </telerikGridView:RadGridView>

                        </radDock:RadDocumentPane>
                    </radDock:RadPaneGroup>
                </radDock:RadSplitContainer>
            </radDock:RadDocking.DocumentHost>

        </radDock:RadDocking>

    </Grid>
</UserControl>


Note: I've replaced the name of the client and the system being developed with xxx

2.  Client code to launch the control as a popup

        void OnHeaderMenuItemClick(object sender, RoutedEventArgs e)
        {
            RadContextMenu menu = (RadContextMenu)sender;
            RadMenuItem clickedItem = ((Telerik.Windows.RadRoutedEventArgs)e).OriginalSource as RadMenuItem;

            if (clickedItem != null)
            {
                string header = Convert.ToString(clickedItem.Header);

                switch (header)
                {
                    case "Add":
                        EntitySelectionList ml = new EntitySelectionList();
                        RadWindow _pL = new RadWindow();
                        _pL.Width = 700;
                        _pL.Height = 600;
                        _pL.Header = "Merchants";
                        _pL.Content = ml;
                        _pL.ShowDialog();
                        break;
                    default:
                        break;
                }
            }
        }



3.  The code, in the EntitySelectionList control, that crahses the browser

        void +Service_GetEntitiesByCompleted(object sender, GetEntitiesByCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null)
                {
                    //Call this TWICE and it crashes the browser
                    gv.ItemsSource = e.Result;
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }



Most machines just blow up instantly, on one machine it displayed a message relating to SysFader before crashing.  Replacing the RadGridView with the standard silverlight DataGrid works.
0
Rossen Hristov
Telerik team
answered on 28 Oct 2009, 08:05 AM
Hello Liam,

We have tried to reproduce this issue, but unfortunately we could not.

Could you please try upgrading to the latest version (BETA2) and see whether this will happen again.

If the issue is still present, we would like to ask you to create a dummy mock-up project that reproduces it and send it to us for investigation.

Kind regards,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Liam
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Liam
Top achievements
Rank 1
Share this question
or