Description
Sorts the grid or matrix based on this column.
Syntax
Parameters
Return Type
An error occurs if the Sortable property is false.
An error occurs if the grid is in the expanded state.
Example
| Sorting a matrix (Visual Basic) | Copy Code |
|---|
oMatrix = oFirstForm.Items.Item("Matrix").Specific
oColumn = oMatrix.Columns.Item("CardCode")
oColumn.TitleObject.Sort(SAPbouiCOM.BoGridSortType.gst_Ascending)
|
|
| Sorting a grid (Visual Basic) | Copy Code |
|---|
oGrid = oFirstForm.Items.Item("MyGrid").Specific
Try
   Â
    oGrid.Columns.Item(0).TitleObject.Sort(SAPbouiCOM.BoGridSortType.gst_Ascending)
    Catch ex As Exception
        If oGrid.Columns.Item(0).TitleObject.Sortable = True Then
           Â
            SBO_Application.MessageBox("Cannot sort when grid is collapsed")
        Else
            SBO_Application.MessageBox("Cannot sort toward unsortable column")
        End If
End Try
|
|
See Also