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

Is there a quick way to SumFunction SourceField?

2 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 22 Mar 2010, 01:58 AM
Is there a quick way to SumFunction?

e.g. I can use SumCount like so:
<telerikGridView:GridViewDataColumn Header="Qty" Width="40" DataMemberBinding="{Binding quantity}"
                                            <telerikGridView:GridViewDataColumn.AggregateFunctions> 
                                                <telerikData:CountFunction Caption="Count: " /> 
                                            </telerikGridView:GridViewDataColumn.AggregateFunctions> 
                                        </telerikGridView:GridViewDataColumn> 



But, for a SumFunction, it seems to crash unless I explicitly define the Sourcefield like so
                                        <telerikGridView:GridViewDataColumn Header="Amount" Width="75" DataMemberBinding="{Binding totalinc}" 
                                                                            DataFormatString="{}{0:c}"
                                            <telerikGridView:GridViewDataColumn.AggregateFunctions> 
                                                <telerikData:SumFunction SourceField="totalinc" /> 
                                            </telerikGridView:GridViewDataColumn.AggregateFunctions> 
                                        </telerikGridView:GridViewDataColumn> 



Is there a way to make the SumFunction, automatically use the source from the parent column?

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 22 Mar 2010, 10:22 AM
Hello Alexander Sun,

I am afraid that the source field for the SumFunction is obligatory . The parent column and the source field are not dependant in any way.

Best wishes,
Pavel Pavlov
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
Pavel Pavlov
Telerik team
answered on 22 Mar 2010, 01:20 PM
Hi Alexander Sun,

A quick update :
I have talked to the team about your requirement and all found your request quite reasonable. We have decided to add some logic to the grid to automatically  set the source field to the owning column when no source field is sissified.

I believe this behavior will be available with the next internal build ( Friday ) . Internal builds are available for download in your Client.NET account.

One more time thanks for the suggestion . I have updated your Telerik points.
Sincerely yours,
Pavel Pavlov
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.
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or