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

SL5 Exception

11 Answers 134 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Park
Top achievements
Rank 1
Park asked on 16 May 2011, 02:38 AM

hi

1. Add Page in SL5 Project
1. Add RadGridView control, 
2. ViewModel binding
( binding object :

    public class CTwitterStatus : INotifyPropertyChanged
    {
        DateTime created_at;
        public DateTime Created_At
        {
            get { return created_at; }
            set
            {
                if (created_at != value)
                {
                    created_at = value;
                    OnPropertyChange("Created_At");
                }
            }
        }

        string id;
        public string Id
        {
            get { return id; }
            set
            {
                if (id != value)
                {
                    id = value;
                    OnPropertyChange("Id");
                }
            }
        }

        string text;
        public string Text
        {
            get { return text; }
            set
            {
                if (text != value)
                {
                    text = value;
                    OnPropertyChange("Text");
                }
            }
        }

        string source;
        public string Source
        {
            get { return source; }
            set
            {
                if (source != value)
                {
                    source = value;
                    OnPropertyChange("Source");
                }
            }
        }

        bool truncated;
        public bool Truncated
        {
            get { return truncated; }
            set
            {
                if (truncated != value)
                {
                    truncated = value;
                    OnPropertyChange("Truncated");
                }
            }
        }

        bool favorited;
        public bool Favorited
        {
            get { return favorited; }
            set
            {
                if (favorited != value)
                {
                    favorited = value;
                    OnPropertyChange("Favorited");
                }
            }
        }

        string in_reply_to_status_id;
        public string In_Reply_To_Status_Id
        {
            get { return in_reply_to_status_id; }
            set
            {
                if (in_reply_to_status_id != value)
                {
                    in_reply_to_status_id = value;
                    OnPropertyChange("In_Reply_To_Status_Id");
                }
            }
        }

        Nullable<int> in_reply_to_user_id;
        public Nullable<int> In_Reply_To_User_Id
        {
            get { return in_reply_to_user_id; }
            set
            {
                if (in_reply_to_user_id != value)
                {
                    in_reply_to_user_id = value;
                    OnPropertyChange("In_Reply_To_User_Id");
                }
            }
        }

        string in_reply_to_screen_name;
        public string In_Reply_To_Screen_Name
        {
            get { return in_reply_to_screen_name; }
            set
            {
                if (in_reply_to_screen_name != value)
                {
                    in_reply_to_screen_name = value;
                    OnPropertyChange("In_Reply_To_Screen_Name");
                }
            }
        }

        int retweet_count;
        public int Retweet_Count
        {
            get { return retweet_count; }
            set
            {
                if (retweet_count != value)
                {
                    retweet_count = value;
                    OnPropertyChange("Retweet_Count");
                }
            }
        }

        bool retweeted;
        public bool Retweeted
        {
            get { return retweeted; }
            set
            {
                if (retweeted != value)
                {
                    retweeted = value;
                    OnPropertyChange("Retweeted");
                }
            }
        }

        CTwitterUser user;
        public CTwitterUser User
        {
            get { return user; }
            set
            {
                if (user != value)
                {
                    user = value;
                    OnPropertyChange("User");
                }
            }
        }

        CTwitterGeo geo;
        public CTwitterGeo Geo
        {
            get { return geo; }
            set
            {
                if (geo != value)
                {
                    geo = value;
                    OnPropertyChange("Geo");
                }
            }
        }

        CTwitterCoordinates coordinates;
        public CTwitterCoordinates Coordinates
        {
            get { return coordinates; }
            set
            {
                if (coordinates != value)
                {
                    coordinates = value;
                    OnPropertyChange("Coordinates");
                }
            }
        }

        CTwitterPlace place;
        public CTwitterPlace Place
        {
            get { return place; }
            set
            {
                if (place != value)
                {
                    place = value;
                    OnPropertyChange("Place");
                }
            }
        }

        CTwitterContributors contributors;
        public CTwitterContributors Contributors
        {
            get { return contributors; }
            set
            {
                if (contributors != value)
                {
                    contributors = value;
                    OnPropertyChange("Contributors");
                }
            }
        }

        #region PropertyChange
        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChange(string PropertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(PropertyName));
            }
        }
        #endregion
    }

    public class CTwitterSet : ObservableCollection<CTwitterStatus>
    {
    }
)

<sdk:Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk
 xmlns:Devpia_ViewModel="clr-namespace:Devpia.ViewModel"
 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
 xmlns:Telerik_Windows_Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Data"
 mc:Ignorable="d"
 x:Class="Devpia.RadGridViewView"
 Title="RadGridViewView Page"
 d:DesignWidth="640" d:DesignHeight="480">
    <d:DesignProperties.DataContext>
        <Devpia_ViewModel:CTwitterViewModel/>
    </d:DesignProperties.DataContext>

    <!--런타임에서 Import를 해서 LayoutRoot.DataContext에 입력됨-->
 <Grid x:Name="LayoutRoot" >
  <telerik:RadGridView ItemsSource="{Binding TwitterSet}" />
 </Grid>
</sdk:Page>

3. build
4. Design time error 

System.TypeLoadException
Could not load type 'System.Collections.ObjectModel.ReadOnlyDictionary`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
   at System.Linq.Expressions.Compiler.CompilerScope.ResolveVariable(ParameterExpression variable, HoistedLocals hoistedLocals)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitParameterExpression(Expression expr)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression(Expression node, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitArguments(MethodBase method, IArgumentProvider args, Int32 skipParameters)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type objectType, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCall(Expression obj, MethodInfo method, IArgumentProvider methodCallExpr, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCallExpression(Expression expr, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression(Expression node, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody(CompilerScope parent, Boolean inlined, CompilationFlags flags)
   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody()
   at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator)
   at Telerik.Windows.Data.BindingToExpressionHelper.CreateUntypedMemberAccessFunc(LambdaExpression memberAccessLambda)
   at Telerik.Windows.Controls.GridViewBoundColumnBase.InitializeMemberAccessFunc() in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 1349
   at Telerik.Windows.Controls.GridViewBoundColumnBase.InitializeDisplayValueFunc() in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 979
   at Telerik.Windows.Controls.GridViewBoundColumnBase.GetCellContent(Object item) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 946
   at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue() in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1382
   at Telerik.Windows.Controls.GridView.GridViewCell.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1377
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 400
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 334
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNextIndex) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 272
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells() in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 205
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_SL\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 293
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

 
Microsoft.Windows.Design.Platform.InvalidDesignerUpdateException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.

 

 

11 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 17 May 2011, 08:00 AM
Hello Park,

I have tried the provided code in Silverlight5 application and no exception can be reproduced. Please, try my test project and let me know about the result. Also, you may modify it in order to show the problem. Thank you.
 
Regards,
Yordanka
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Park
Top achievements
Rank 1
answered on 18 May 2011, 01:37 AM
Hi Yordanka

thank you demo prj
i running your demo prj.

but, some different my prj

here my prj downlink

0
Accepted
Yordanka
Telerik team
answered on 20 May 2011, 12:50 PM
Hello Park,

Thank you for the project and for the cooperation.
We have made a profound investigation after we succeeded in reproducing the design-time exception. It occurs that this is not a problem related to RadGridView. The exception is thrown because of incompatibility between VS 2010 SP1 and Silverlight 5 beta. We reported the matter to Microsoft and hopefully they will address it soon.
 
Best wishes,
Yordanka
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason
Top achievements
Rank 1
answered on 07 Jun 2011, 05:57 PM
Any update to this? Work around?
0
Vlad
Telerik team
answered on 08 Jun 2011, 07:01 AM
Hi,

 We submitted bug report to Microsoft. No update so far! 

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
codeputer
Top achievements
Rank 2
answered on 17 Jun 2011, 11:04 PM
This is an issue for us as well.  Can we have more info so that we can skirt the issue?  I have a demo and would like to show off Telerik controls to management.

The source I have works in SL4, but I'm too far down the SL5 road to rip it out.  HELP!

Regards,
Richard
0
Andrew
Top achievements
Rank 1
answered on 21 Oct 2011, 04:20 AM
I have the same problem; hopefully it'll be solved by the time MS releases SL5.

Edit: Did they fix it in SL5 RC? If they did, I will upgrade.
0
Vlad
Telerik team
answered on 21 Oct 2011, 06:53 AM
Hi Andrew,

 Indeed in the latest internal builds of Silverlight 5 this is resolved. 

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Jason
Top achievements
Rank 1
answered on 21 Oct 2011, 05:15 PM
You say internal builds - is there a public drop yet? if not, do we have a timeline?  What is the version number that fixed the bug? 

0
Vlad
Telerik team
answered on 24 Oct 2011, 07:05 AM
Hello Jason,

 I'm referring Silverlight 5 internal builds - not Telerik RadControls for Silverlight internal builds.

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
brijesh
Top achievements
Rank 1
answered on 30 Nov 2012, 09:57 PM
Tags
GridView
Asked by
Park
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Park
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Vlad
Telerik team
codeputer
Top achievements
Rank 2
Andrew
Top achievements
Rank 1
brijesh
Top achievements
Rank 1
Share this question
or