Bogemic Software        Bogemic Software RSS  Subscribe: RSS       Products  |  Purchase  |  Support  |  Contact      
Products
  Bogemic Apps
  Bogemic Docs
  Bogemic Studio
  Bogemic Grid
  Services
Order Now
Ordering Process
Documentation
Press Releases
Reseller
Feedback Form
Technical Support
Contact

Sorting

« Back Forward »

Methods: Sort, ResetSort
Properties: Column.SortOrder, Column.SortType, Column.AllowSort, AutoSort, NextSortOrder

Setting the sorting properties of the column

Prepare the first column for sorting:

Set col = grid.Column("A")

' allow sorting for this column
col.AllowSort = true

' get the sort priority for this column
col.SortOrder = grid.NextSortOrder

' set the type of sorting
col.SortType = SortType_Ascending

Sorting, automatic mode

Note that the column has a string data type as default. To sort rows as numbers, set the appropriate data type for the column. Now sort the grid:

grid.Sort


To sort the grid automatically, set AutoSort to true:

grid.AutoSort = true

Resetting sort settings

To reset all sort settings for all columns, use the ResetSort method:

grid.ResetSort

« Back Up Forward »