GrapeCity MultiRow Windows Forms Documentation
SortItem Constructor(String,SortOrder)
Example 


The name of the cell by which to sort the contents of the GcMultiRow control.
One of the System.Windows.Forms.SortOrder values that indicates the sort order.
Initializes a new instance of the SortItem class.
Syntax
Public Function New( _
   ByVal cellName As String, _
   ByVal sortOrder As SortOrder _
)
Dim cellName As String
Dim sortOrder As SortOrder
 
Dim instance As New SortItem(cellName, sortOrder)
public SortItem( 
   string cellName,
   SortOrder sortOrder
)

Parameters

cellName
The name of the cell by which to sort the contents of the GcMultiRow control.
sortOrder
One of the System.Windows.Forms.SortOrder values that indicates the sort order.
Example
The following code example shows how to sort multiple cells in a GcMultiRow control. To run this example, you should create a GcMultiRow control in a form with a template. The template should contain at least two cells in the row. You can call this method in a button click event handler or form load event.
void SortByCodeMultiCells()
        {
            SortItem sortItem1 = new SortItem(0, SortOrder.Ascending);
            SortItem sortItem2 = new SortItem(1, SortOrder.Descending);

            SortItem[] sortItems = new SortItem[] { sortItem1, sortItem2 };

            // In one sort operator, sort two cells in all rows by using SortItem.
            this.gcMultiRow1.Sort(sortItems);
        }
Private Sub SortByCodeMultiCells()
        Dim sortItem1 As New SortItem(0, SortOrder.Ascending)
        Dim sortItem2 As New SortItem(1, SortOrder.Descending)

        Dim sortItems As SortItem() = New SortItem() {sortItem1, sortItem2}

        ' In one sort operator, sort two cells in all rows by using SortItem.
        Me.gcMultiRow1.Sort(sortItems)
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SortItem Class
SortItem Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.