Trasposing columns to rows inside a HTMLDataSet that uses a table.

There are cases where you want your table to be read left-to-right instead of top-to-bottom. You can achieve this by passing {useColumnsAsRows:true} optional parameter.


Here's the constructor code for the DataSet used in the sample.

	var ds1 = new Spry.Data.HTMLDataSet(null, "sampleTable", {hideDataSourceElement:false, useColumnsAsRows:true});

Table using spry references. The columns from the original table are now used as rows.

Developer Name Home Work Mobile
{Developers/Phones} {Home} {Work} {Mobile}

Original source table. This is not hidden by the HTMLDataSet because optional parameter {hideDataSourceElement:false} is passed to the constructor.

Developers/Phones John Andrew Henry
Home 331-3291 331-3292 331-3293
Work 332-3291 332-3292 332-3293
Mobile 333-3291 333-3292 333-3293