You can sort data in the widget and specify a column or row index to sort on as well as the sort criteria.
For more information, see Sorting Data.