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

AG_E_UNKNOWN_ERROR on data binding

4 Answers 121 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.
Riccardo
Top achievements
Rank 1
Riccardo asked on 28 May 2009, 02:17 PM
Binding data on a RadGridView I've obtained this error:
Errore di run-time di Microsoft JScript: Unhandled Error in Silverlight 2 Application AG_E_UNKNOWN_ERROR [Line: 39 Position: 43]  
   --- Inner Exception ---  
Errore HRESULT E_FAIL restituito da una chiamata a un componente COM.  
   su System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)  
   su DockTest.Page.InitializeComponent()  
   su DockTest.Page..ctor()  
   su DockTest.App.Application_Startup(Object sender, StartupEventArgs e)  
   su System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)  
   su MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) 


I've seen that is linked to a data overflow. I create collection with a for loop: over 698 loops silverlight crash.
I've tried also to grow dimension of single record, and silverlight brakes with more less loops.
Finally I've tried to bind two different grid, and brakepoint loop numbers become half then original.

Do you know if it's a silverlight memory overflow?
Thanks!

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 28 May 2009, 02:31 PM
Hello Riccardo,

Can you send us small example where we can reproduce and debug this?

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 28 May 2009, 02:41 PM
This is the xaml example:
<telerikGrid:RadGridView x:Name="DocFilterData" AutoGenerateColumns="False" ColumnsWidthMode="Fill" Grid.Row="1" Margin="10,0,10,10"   
                    CanUserReorderColumns="true" 
                    CanUserSortColumns="True" 
                                     Height="Auto" Width="Auto" IsFilteringAllowed="True" ScrollMode="RealTime" 
                                     > 
            <telerikGrid:RadGridView.Columns> 
                <telerikGrid:GridViewDataColumn HeaderText="Nome" UniqueName="Nome" /> 
                <telerikGrid:GridViewDataColumn HeaderText="Cognome" UniqueName="Cognome" /> 
                <telerikGrid:GridViewDataColumn HeaderText="Ruolo" UniqueName="Ruolo"  /> 
            </telerikGrid:RadGridView.Columns> 
        </telerikGrid:RadGridView> 


And this is the xaml.cs example, that create the list and bind:
public partial class DocFilterDemo : UserControl 
    { 
        public DocFilterDemo() 
        { 
            InitializeComponent(); 
 
            //Nome,Cognome,Ruolo 
            Persone lp = new Persone(); 
 
            int n = 690; 
            int ii = 0; 
            for (int i = 0; i < n; i++) 
            { 
                ii = i; 
                lp.Add(ii + "Riccardo", ii + "Mares""eWeb"); 
                lp.Add(ii + "Franzoso", ii + "Stefano""eDms"); 
                lp.Add(ii + "Christina", ii + "Danieli""eCrm"); 
                lp.Add(ii + "Francesco", ii + "Pillan""eCrm"); 
                lp.Add(ii + "Roberta", ii + "Barbiero""eCrm"); 
                lp.Add(ii + "Tiziana", ii + "Formilli""eCrm"); 
                lp.Add(ii + "Davide", ii + "Sattin""eDms"); 
                lp.Add(ii + "Gigi", ii + "Comincini""eDms"); 
            } 
 
            DocFilterData.ItemsSource = lp; 
        } 
    } 


Persona is a simply class with three string properties (nome, cognome, ruolo). Persone is a List<Persona>.
Persone.Add(...) simply create a new Persona entity and add it to list.
0
Hristo Deshev
Telerik team
answered on 30 May 2009, 09:25 AM
Hello Riccardo,

I copied your code in a project, and run it, but I got no error back. The code runs fine even for 1690 items.

What am I missing? I am attaching my project -- can you reproduce the error there?

All the best,
Hristo Deshev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Riccardo
Top achievements
Rank 1
answered on 04 Jun 2009, 08:17 AM
Thank Hristo, I've tried your example since 20000 loops, without errors.
I've retried mine (after installing telerik version 2009_01_0526) but it broke on loading:
throw new Error("Unhandled Error in Silverlight 2 Application AG_E_UNKNOWN_ERROR [Line: 42 Position: 43]\n   --- Inner Exception ---\nErrore HRESULT E_FAIL restituito da una chiamata a un componente COM.\n   su System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)\n   su DockTest.Page.InitializeComponent()\n   su DockTest.Page..ctor()\n   su DockTest.App.Application_Startup(Object sender, StartupEventArgs e)\n   su System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)\n   su MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)");


I think maybe something in the full application. Indeed I've tried to launch only mine xaml of grid, out from main application (container) and it works like your. Some conflict? I'll try to isolate every element.

Thanks
Tags
GridView
Asked by
Riccardo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Riccardo
Top achievements
Rank 1
Hristo Deshev
Telerik team
Share this question
or