Fields in Grid to be sorted (0 based). When specified, the Up/Dn sort arrows will be added to the Column header.

dbQP Abbr: sf
Version: All

Namespace:  Tornado
Assembly:  Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)

Syntax

C#
public string dbSortFlds { get; set; }
Visual Basic (Declaration)
Public Property dbSortFlds As String

Field Value

Mydb.dbSortFlds="FieldName or FieldNumber in Grid to be sorted (0 based)"

Mydb.dbSortFlds = "0,1,2,3"

Mydb.dbSortFlds = "employeeid, 1, firstname"

Remarks

There are three states to the sort - ASC(Up Arrow) | DESC(Dn Arrow) | None(No Arrow). This capability is built-in. The sort supports multiple fields. Click on up or dn arrow will toggle the sort. Click the opposite sort order arrow will change the sort direction and maintain the sort order. Click the same sort order will set the sort state to None. Inspect the status bar for sort order.

Multiple fields sort is advanced and sometime confusing. If single field sort mode (classic ASP-db) is desired - use dbOptions="SingleColumnSort=true". Single field sort means only one field column is sorted at any time.

Examples

CopyVB.NET
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  Dim CS As New Tornado.z
  With CS
      .dbQP = "U=12| S=17|Gdf=0,1,2,3,4| D=Nwind| Q=Orders| Th=tit=Single Col Sort"
      .dbSortFlds = "0,1,employeeid,3"
      .dbSortColLeftJustify = True
      '...Following option force single column sort
      .dbOptions = "SingleColumnSort=true"
      .ASPdbNET()
  End With
End Sub
</script>

See Also