We will provide calculated vales in two column. First, we will concatenate firstName and lastName to display as a single display name. Secondly, we will look at an employee's start date, and determine that employee's next performance review date.
This scenario demonstrates:
How to concatenate to separate data points to create a single value
How to format a date so it's more readable
How to calculate a date conditionally
Test it out
Sort the grid by the "Name" column. Notice that the data sorts appropriately even across all pages of data.
Notable implementation details
In order to correctly sort on the calculated column, we queried the entire data set, calculated the new value for each row, then paged and sorted on the result. If you were to only calculate the column for the current page, sorting on the calculated column would not work correctly across pages.
Since you must query all data and then loop over each item to calculate the additional data, this technique should not be used for a large amount of data, as the query and calculation may become slow. To further optimize this grid, only perform the calculation on every row when the user sorts by the calculated column, otherwise, simply calculate the data for the current page.