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

Computed Columns / Derived Columns

3 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 02 Jun 2010, 11:00 AM
Can I have a column whose value is derived from the difference of a column in two rows. Like:

For example I have following radgrid:

Row_Id         Rank                            Derived Col
1                     5                                      0
2                     7                                      2
3                     7                                      0
4                     3                                     -4                         

Derived col = TableRow.Rank - TableRow(-1).Rank

Is it possible using bindings?

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Jun 2010, 12:25 PM
Hello,

I've attached an example to illustrate you how to achieve this at your data level.

Best wishes,
Vlad
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
M
Top achievements
Rank 1
answered on 02 Jun 2010, 12:35 PM
Ok, I see a public property which computes its value based on same object's two properties. My scenario is a little different than that. Let me know if you want me to elaborate.
0
Vlad
Telerik team
answered on 02 Jun 2010, 01:10 PM
Hello,

Currently calculated property can be achieved only at your data level. The best approach will be to wrap your original data in a custom model and bind the grid to this model. In other words - MVVM.

Best wishes,
Vlad
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
M
Top achievements
Rank 1
Answers by
Vlad
Telerik team
M
Top achievements
Rank 1
Share this question
or