Custom Data Set Columns Sample

This sample shows you how to do some preliminary processing of the data in your data set, and add custom columns to it so that it is accessible from a region.

 In this example, the data loaded into the data set from the XML file contains the following columns:

An onPostLoad observer function is added to our dsTeams data set so that after the data is loaded, we can run through the data in each row and add additional info to custom columns based on some calculations. The custom columns that will be added to the data set are:

After this processing, these custom columns, as well as the original columns that were loaded from the XML data, are accessible within any spry:region or spry:detailregion that depends on the dsTeams data set.

Team Round 1 Round 2 Round 3 Round 4 Round 5 High Score Average Total
{name} {round1} {round2} {round3} {round4} {round5} {highScore} {average} {total}