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

Invalid property or field exception on Q3 Beta release

6 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Daní
Top achievements
Rank 1
Daní asked on 28 Oct 2009, 06:13 PM
Hi,

I'm working with GridView in a scenario with dynamic data. That means that at design time I don't know how many columns in their name the application will have at run time.

DataSource returns a collection o pair values with temporal data, that means that I have a collection a pair of DateTime-Value. What Im' doing is create a new dynamic type using Reflection.Namespace. This dynamic type has as many properties as differents DateTimes are received form datasoource. Each new property has as name "Propietat" + date.ToString("ddMMyyyyHHmmss"). The resulting collection of this new types are bind to the GridView. Previou to binding, I add to the gridview a new GridViewDataColumn for each property in dynamic type. 

Everything works great with Q2 2009 SL3 version. To imporve performance, since Q3 2009 versions implements Column Virtualization and I can get many columns I'm trying to upgrade to the new release but I'm getting the next expcetion.
Detalls d'error de pàgina web

Agent d'usuari: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MDDS; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Data i hora: Wed, 28 Oct 2009 17:59:42 UTC


Missatge: Unhandled Error in Silverlight 3 Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.ArgumentException: Invalid property or field - 'Propietat10102009085856' for type: ProvaClinicaViewModel
   en Telerik.Windows.Data.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance)
   en Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName)
   en Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull)
   en Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpression()
   en Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateLambdaExpression()
   en Telerik.Windows.Data.DataFieldDescriptorExtensions.CreateMemberAccessLambdaExpression(IDataFieldDescriptor fieldDescriptor)
   en Telerik.Windows.Data.DataFieldDescriptorExtensions.CreateUntypedMemberAccessFunc(IDataFieldDescriptor fieldDescriptor)
   en Telerik.Windows.Data.DataFieldDescriptorExtensions.CreateMemberAccessFunc(IDataFieldDescriptor fieldDescriptor)
   en Telerik.Windows.Controls.GridViewDataColumn.get_MemberAccessFunc()
   en Telerik.Windows.Controls.GridViewDataColumn.GetCellContent(Object value)
   en Telerik.Windows.Controls.GridView.GridViewCellBase.ConvertValueToContent(Object value)
   en Telerik.Windows.Controls.GridView.GridViewCell.OnValueChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
   en Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   en System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
   en System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)
   en System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
   en System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   en System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
   en System.Windows.FrameworkElement.SetBinding(DependencyProperty dp, Binding binding)
   en Telerik.Windows.Controls.GridView.DataCellsPresenter.SetCellValueBinding(GridViewCellBase cell, GridViewDataColumn dataColumn)
   en Telerik.Windows.Controls.GridView.DataCellsPresenter.SetCellDataProperties(IFieldDescriptor fieldDescriptor, GridViewCellBase cell)
   en Telerik.Windows.Controls.GridView.DataCellsPresenter.CreateCellsForPanel(List`1 columns, Panel gridViewCellsPanel, Boolean frozen)
   en Telerik.Windows.Controls.GridView.DataCellsPresenter.CreateCellsFromColumns(List`1 columns)
   en Telerik.Windows.Controls.GridView.DataCellsPresenter.OnApplyTemplate()
   en System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)     

Línia: 59
Caràcter: 13
Codi: 0
URI: http://localhost:11428/AplicacioGraficsSite/Default.html

6 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 28 Oct 2009, 06:24 PM
Hello Daní,

May I suggest an alternative approach when dealing with dynamic data? We have created a lightweight implementation of DataTable for Silverlight  which is really easy so use and it will spare you a great deal of coding. Feel free to  take a look at our DataTable for Silverlight here.


Regards,
Milan
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
Daní
Top achievements
Rank 1
answered on 28 Oct 2009, 06:30 PM
False alarm. I did a mistake downloading the latest internal build, I got the SL2 version. However, when many colunmsn are supplied (about 100) the performance is still poor.
0
Milan
Telerik team
answered on 29 Oct 2009, 12:14 AM

Hello Daní,

We are still working on several performance tweaks that will further improve the scrolling performance. The official release is just around the corner and the scrolling of the Q3 RadGridView will be more responsive the one in Beta 2.

Sincerely yours,
Milan
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
Daní
Top achievements
Rank 1
answered on 29 Oct 2009, 09:57 AM
My apologies,

GridView in Q3 BETA2 performs really better than Q2 version, However it has an extrange behavior, when I debug the application, as I commented, perfomance semms really bad but starting the application without debug shows a really great perfomance. Maybe somebody can explain it,

Excuse me again.
0
Hristo
Telerik team
answered on 30 Oct 2009, 05:20 PM
Hello Daní,

We were unable to reproduce this behavior. Could you send us the project which you are using so that we can investigate it further?

Greetings,
Hristo
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
Daní
Top achievements
Rank 1
answered on 30 Oct 2009, 05:33 PM
Hi Hristo,

It's difficult to me to send you the whole project, I'm working with confidential data coming from a webservice in a Intranet environment, so you won't have acces to it... and you shouldn't.

As a comment, bad performance manifests when I load a large "dataset" with many columns, more than 100 ,I know is not a current scenario, data show test results in diferent time intervals, each interval means a new column, each row represent a different test tyoe, so I need to generate columns dynamically via Reflection.Emit namespace. Unfortunately, your lightweight implementation of DataTable doesn't fit our need cause it doesn't accept complex data as field.

I'll try to repoduce this behavior in a reduced version with test data and will upload id.
Tags
GridView
Asked by
Daní
Top achievements
Rank 1
Answers by
Milan
Telerik team
Daní
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or