sortRange

sorts a range of cells

void sortRange( [string range,string dir] );
rangestringoptional, the range of cells that should be sorted, null to sort the selected range
dirstringoptional, the sorting direction: "asc" or "desc" ("asc" by default)

Example

// sorts the specified range in the default ("asc") order
$$("ssheet").sortRange("B2:B4");
// sorts the specified range in the descending order
$$("ssheet").sortRange("B2:B4", "desc");
// sorts the selected range in the descending order
$$("ssheet").sortRange(null,"desc");

Related samples

Back to top
If you have not checked yet, be sure to visit site of our main product Webix lightweight js framework and page of web based spreadsheet product.