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

Getting compiler error since upgrading to VS 2012

2 Answers 36 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 28 Feb 2013, 08:26 PM
I'm using version 2012.3.1129.40 of the Telerik controls for WPF.  I have a RadGridView control in one window which uses the CountAggregateFunction:
<telerik:RadGridView AutoExpandGroups="False"
                     AutoGenerateColumns="False"
                     CanUserDeleteRows="False"
                     CanUserFreezeColumns="False"
                     CanUserInsertRows="False"
                     CanUserResizeColumns="True"
                     CanUserSortColumns="True"
                     DataLoadMode="Synchronous"
                     EnableColumnVirtualization="True"
                     EnableRowVirtualization="True"
                     FontSize="16"
                     FontWeight="Bold"
                     Grid.Column="0"
                     Grid.Row="0"
                     IsReadOnly="True"
                     ItemsSource="{Binding Path=HotLists, RelativeSource={RelativeSource AncestorType={x:Type cs:HotListManager}}}"
                     Name="HotListGrid"
                     RowIndicatorVisibility="Collapsed"
                     ScrollViewer.CanContentScroll="True"
                     ScrollViewer.HorizontalScrollBarVisibility="Auto"
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     SelectionChanged="HotListGrid_SelectionChanged"
                     SelectionUnit="FullRow"
                     ShowColumnFooters="True"
                     ShowGroupPanel="False"
                     ToolTip="Hot Lists">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding Name      , Mode=OneWay}"
                                     Header="Hot List"
                                     Width="*">
            <telerik:GridViewDataColumn.AggregateFunctions>
                <telerik:CountFunction Caption="Count: " ResultFormatString="{}{0:n0}" />
            </telerik:GridViewDataColumn.AggregateFunctions>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding ListType  , Mode=OneWay}"
                                     Header="List Type"
                                     Width="Auto" />
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding LastUpdate, Mode=OneWay, Converter={StaticResource DateConverter}}"
                                     Header="Last Update"
                                     MinWidth="160"
                                     Width="Auto" />
        <telerik:GridViewImageColumn DataMemberBinding="{Binding Status    , Mode=OneWay, Converter={StaticResource DeviceStatuses}}"
                                     Header="Status"
                                     ImageStretch="None"
                                     Width="95" />
        <telerik:GridViewDataColumn  Header="Entries"
                                     TextAlignment="Right"
                                     MinWidth="125"
                                     Width="Auto">
            <telerik:GridViewDataColumn.DataMemberBinding>
                <Binding Path="EntryCount"
                         Mode="OneWay"
                         Converter="{StaticResource LongConverter}"
                         ConverterParameter="#,##0" />
            </telerik:GridViewDataColumn.DataMemberBinding>
            <telerik:GridViewDataColumn.AggregateFunctions>
                <telerik:SumFunction ResultFormatString="{}{0:n0}" />
            </telerik:GridViewDataColumn.AggregateFunctions>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

When I was running VS2010, this compiled fine.  However, after upgrading to VS 2012, I get the following error for both of the Aggregate Functions:

The specified value cannot be assigned to the collection. The following type was expected: "AggregateFunction".

The thing is the compiled code runs fine.  It's just an error that shows up in the design pane and doesn't stop the compile code from running.

How do I fix this problem?

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Mar 2013, 07:19 AM
Hi,

 Can you try to clean and rebuild the solution?

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tony
Top achievements
Rank 1
answered on 08 Mar 2013, 08:11 PM
THis worked.  Thanks
Tags
GridView
Asked by
Tony
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Tony
Top achievements
Rank 1
Share this question
or