Sugerir traducción
 
Otros han sugerido:

progress indicator
No hay más sugerencias.
Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Ver contenido:  en paraleloVer contenido: en paralelo
.NET Framework Class Library
DataView..::.Sort Property

Gets or sets the sort column or columns, and sort order for the DataView.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)
Visual Basic
Public Property Sort As String
    Get
    Set
C#
public string Sort { get; set; }
Visual C++
public:
property String^ Sort {
    String^ get ();
    void set (String^ value);
}
F#
member Sort : string with get, set

Property Value

Type: System..::.String
A string that contains the column name followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted ascending by default. Multiple columns can be separated by commas.

If you do not explicitly specify sort criteria for DataView, the DataRowView objects in DataView are sorted based on the index of its corresponding DataRow in the DataTable.Rows DataRowCollection.

For more information, see DataViews (ADO.NET).

The following example instructs the DataView to sort the table by two columns.

Visual Basic
Private Sub SortByTwoColumns()
    ' Get the DefaultViewManager of a DataTable.
    Dim view As DataView = DataTable1.DefaultView

    ' By default, the first column sorted ascending.
    view.Sort = "State, ZipCode DESC"
End Sub
C#
private void SortByTwoColumns()
{
    // Get the DefaultViewManager of a DataTable.
    DataView view = DataTable1.DefaultView;

    // By default, the first column sorted ascending.
    view.Sort = "State, ZipCode DESC";
}

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Biblioteca de clases de .NET Framework
DataView..::.Sort (Propiedad)

Obtiene o establece las columnas y el criterio de ordenación de DataView.

Espacio de nombres:  System.Data
Ensamblado:  System.Data (en System.Data.dll)
Visual Basic
Public Property Sort As String
    Get
    Set
C#
public string Sort { get; set; }
Visual C++
public:
property String^ Sort {
    String^ get ();
    void set (String^ value);
}
F#
member Sort : string with get, set

Valor de propiedad

Tipo: System..::.String
Cadena que contiene el nombre de columna seguido de "ASC" (ascendente) o "DESC" (descendente). Las columnas se clasifican en orden ascendente de forma predeterminada. Varias columnas se pueden separar con comas.

Si no se especifican explícitamente los criterios de ordenación para DataView, los objetos DataRowView en DataView se ordenan de acuerdo con el índice del objeto DataRow correspondiente en DataTable.Rows DataRowCollection.

Para obtener más información, vea DataViews (ADO.NET).

En el ejemplo siguiente se indica al DataView que ordene la tabla mediante dos columnas.

Visual Basic
Private Sub SortByTwoColumns()
    ' Get the DefaultViewManager of a DataTable.
    Dim view As DataView = DataTable1.DefaultView

    ' By default, the first column sorted ascending.
    view.Sort = "State, ZipCode DESC"
End Sub
C#
private void SortByTwoColumns()
{
    // Get the DefaultViewManager of a DataTable.
    DataView view = DataTable1.DefaultView;

    // By default, the first column sorted ascending.
    view.Sort = "State, ZipCode DESC";
}

.NET Framework

Compatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Compatible con: 4, 3.5 SP1

Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2

.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker