Row Summery Problem

2 posts, 0 answers
  1. amirnet
    amirnet avatar
    5 posts
    Member since:
    Jul 2007

    Posted 27 Oct 2009 Link to this post

    Hi ,im facing strange problem  , project compiles successfully,app works fine to, but designer window shows error , i dunno whats the "type: Customer" it doesnt exits in my project
    thanks
    itemsource provider is EntityFramework
    <telerik:RadGridView.Columns>
                  
      <telerik:GridViewDataColumn Header="Cost" DataMemberBinding="{Binding Cost}"  DataType="{x:Type System:Double}" >
                        <grid:GridViewDataColumn.AggregateFunctions>
                            <data:SumFunction Caption="Sumا "  SourceField="Cost" />
                        </grid:GridViewDataColumn.AggregateFunctions>
                    </telerik:GridViewDataColumn>

    </telerik:RadGridView.Columns>



    Error:
    Invalid property or field - 'Cost' for type: Customer
       at Telerik.Windows.Data.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\Tokenizer\MemberAccessTokenExtensions.cs:line 21
       at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\ExpressionFactory.cs:line 32
       at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\ExpressionFactory.cs:line 42
       at Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\PropertyAccessExpressionBuilder.cs:line 15
       at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateMemberSelectorExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\Aggregates\EnumerableSelectorAggregateFunctionExpressionBuilder.cs:line 37
       at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateAggregateExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\Aggregates\EnumerableSelectorAggregateFunctionExpressionBuilder.cs:line 28
       at Telerik.Windows.Data.EnumerableSelectorAggregateFunction.CreateAggregateExpression(Expression enumerableExpression) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Data\Grouping\Aggregates\EnumerableSelectorAggregateFunction.cs:line 22
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<ProjectionPropertyValueExpressions>b__3(AggregateFunction f) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 212
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 203
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 195
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<CreateMemberBindings>d__0.MoveNext() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 113
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at System.Linq.Expressions.ReadOnlyCollectionExtensions.ToReadOnlyCollection[T](IEnumerable`1 sequence)
       at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 105
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateSelectExpression() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilder.cs:line 97
       at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery() in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Expressions\Grouping\GroupDescriptorExpressionBuilderBase.cs:line 30
       at Telerik.Windows.Data.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\Collections\QueryableExtensions.cs:line 92
       at Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3066
       at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass3c.<Bind>b__3b() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3345
       at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
       at Telerik.Windows.Controls.GridView.GridViewDataControl.Bind(Object newValue) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3271
       at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue) in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 2946
       at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\DataControl.cs:line 361
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.DataControl.set_ItemsSource(Object value) in c:\Builds\WPF_Scrum\Core_WPF\Sources\Development\Core\Data\DataControl.cs:line 149
       at Telerik.Windows.Controls.RadGridView.OnApplyTemplate() in c:\Builds\WPF_Scrum\GridView_WPF\Sources\Development\Controls\GridView\GridView\GridView\RadGridView.cs:line 226
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Designer.SimpleViewManager.DesignerBackground.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
       at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Interop.HwndSource.SetLayoutSize()
       at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder.Initialize()
       at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder..ctor(UIElement content)
       at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.get_ViewHandle()
       at MS.Internal.Host.Isolation.IsolatedView.get_ViewHandle()
       at MS.Internal.Designer.DesignerPane.LoadDesignerView()
  2. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 30 Oct 2009 Link to this post

    Hello amirnet,

    The problem is that we are using a design time generated data which is the Customers table from Northwind. What you can use in your case if you want design time support is to bind your grid declaratively in XAML using ObjectDataProvider.


    Best wishes,
    Stefan Dobrev
    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.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top