New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
sort
Updated over 6 months ago
Method which triggers sort command for the column with DataField (set on the server) passed as an argument. If you set AllowMultiColumnSorting to true server-side, each subsequent call to this method will sort the corresponding column. All server-side sorting capabilities of RadGrid are applicable here as well. See the topic describing the fireCommand() client-side method for further details.
| sort(sortExpression) | ||
|---|---|---|
| sortExpression | String | The DataField of the column to be sorted. |
Example:
JavaScript
function SortColumnContactName() {
var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
masterTable.sort("ContactName");
}