OrderByExpression.Direction Propriedade
Definição
Obtém ou define a direção da classificação do objeto de fonte de dados IQueryable.Gets or sets the sort direction of the IQueryable data source object.
public:
property System::Web::UI::WebControls::SortDirection Direction { System::Web::UI::WebControls::SortDirection get(); void set(System::Web::UI::WebControls::SortDirection value); };
public System.Web.UI.WebControls.SortDirection Direction { get; set; }
member this.Direction : System.Web.UI.WebControls.SortDirection with get, set
Public Property Direction As SortDirection
Valor da propriedade
A direção de classificação do objeto de fonte de dados.The sort direction of the data source object.
Exemplos
O exemplo a seguir mostra como classificar dados pelo campo ListPrice em ordem decrescente e, em seguida, pelo campo ProductID em ordem crescente.The following example shows how to sort data by the ListPrice field in descending order and then by the ProductID field in ascending order. Este exemplo de código é parte de um exemplo maior fornecido em passo a passos: filtrar dados em uma página da Web usando a sintaxe declarativa.This code example is part of a larger example provided in Walkthrough: Filtering Data in a Web Page Using Declarative Syntax.
<asp:OrderByExpression DataField="ListPrice"
Direction="Descending">
<asp:ThenBy DataField="ProductID" Direction="Ascending"/>
</asp:OrderByExpression>
Comentários
A OrderByExpression classe é usada no QueryExtender controle para classificar dados em ordem crescente ou decrescente.The OrderByExpression class is used in the QueryExtender control to sort data in ascending or descending order. A direção da operação de classificação é especificada usando a Direction propriedade.The direction of the sort operation is specified by using the Direction property.