GridCells.Sort

Sort(int, int, int, int, int, bool, bool, bool)

Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index. Sorts the datas ascend/decend left to right in a range of a Worksheet by specified row index.

public void Sort(int startRow, int startColumn, int rows, int columns, int index, bool isAsending, 
    bool isCaseSensitive, bool islefttoright)
ParameterTypeDescription
startRowInt32The row number of the first cell to sort.
startColumnInt32The column number of the first cell to sort.
rowsInt32Number of rows to be imported.
columnsInt32Number of columns to be imported.
indexInt32The column index that specifis the sort column. if the Orientation is top to bottom ,it stand for the column index that specifis the sort column. if the Orientation is from left to right,it stand for the row index that specifis the sort row.
isAsendingBooleanwhether the sorting order is asending .
isCaseSensitiveBooleanwhether the sort is casesensitive .
islefttorightBooleanwhether the sort orientation is from left to right

Examples


 [C#]
 GridWeb GridWeb1 = new GridWeb();
 GridWeb1.WorkSheets[0].Cells.Sort(1,0,25,6,3,true,true,false);

 [VB]

 GridWeb1.WebWorksheets(0).Cells.Sort(1,0,25,6,3,true,true,false)

See Also


Sort(int, int, int, int, int[], SortByOrder[], SortOrientation, bool)

Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index. Sorts the datas ascend/decend left to right in a range of a Worksheet by specified row index.

public void Sort(int startRow, int startColumn, int rows, int columns, int[] indexes, 
    SortByOrder[] orders, SortOrientation orientation, bool isCaseSensitive)
ParameterTypeDescription
startRowInt32The row number of the first cell to sort.
startColumnInt32The column number of the first cell to sort.
rowsInt32Number of rows to be imported.
columnsInt32Number of columns to be imported.
indexesInt32[]The column index array that specifis the sort column. if the Orientation is top to bottom ,it stand for the column index that specifis the sort column. if the Orientation is from left to right,it stand for the row index that specifis the sort row.
ordersSortByOrder[]the the sorting order array .
orientationSortOrientationsorting orientation
isCaseSensitiveBooleanwhether the sort is casesensitive .

Examples


 [C#]
 GridWeb GridWeb1=new GridWeb();
 int[] ids={0,1};
 SortByOrder[] sorder={SortByOrder.Ascending,SortByOrder.Descending};
 GridWeb1.WorkSheets[0].Cells.Sort(1,0,25,6,ids,sorder,SortOrientation.SortTopToBottom,false);

 [VB]

 GridWeb1.WorkSheets(0).Cells.Sort(1,0,25,6,ids,sorder,SortOrientation.SortTopToBottom,false)

See Also