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