|
|
Expressions
Expressions allow users to do record-oriented calculations, effectively adding a new value to the data collection calculated from the existing values.
|
|
|
|
Use expression to add computed values to the information in the data. For example, if the data contains a 'Price' and a 'Discount', then the expression can compute the discounted price. To create an expression, users provide a name to associate with the new item, a headertext property that is a display name and an algebraic expression involving the other columns in the data source. The following graphic represents a code window showing how this might be done.
Code to add a expression field
|
|
|
|
Expression fields let users add new columns with formula expressions. The Grouping Engine comes with its own extensible formula engine. Expression fields can be used in records just like a regular field. Users may create summaries, group, sort or create filters based on expression fields.
The following picture shows a GridGroupingControl with the 'Gain' expression field. It is calculated based on Shares and PaidPrice. A summary for totals is shown at the end of the group.
The Gain Expression
|
|
|
|
|
|
|