Referenced By      Properties       Methods Send us your Feedback
SGRow Object

Name: SGRow
Description: SGRow is object that represents one grid row.
GUID: {ACAE77F2-E214-11D2-8F41-008048E27A77}

 Show Example
 Copy Code     Show Me

The following example shows how to use BeeGrid like Vertical Menu.

Private Sub ScrollRows(CurrRow As SGRow)
   Dim row As SGRow

   For Each row In SGGrid1.Rows
      row.Style = "Heading"
      row.Height = 300
      row.Style.TextAlignment = sgAlignCenterCenter
      row.Style.DisplayType = sgDisplayText
      row.Cells(0).Value = row.Position + 1
   Next
   
   With CurrRow
      .Height = SGGrid1.ClientHeight - 4 * 300
      .Style = "Normal"
      .Style.DisplayType = sgDisplayPicture
      .Style.PictureAlignment = sgPicAlignTile
   End With
End Sub

Private Sub SGGrid1_OnInit()
   Dim i As Integer
   Dim row As SGRow

   SGGrid1.RedrawEnabled = False
   'misc stuff
   SGGrid1.GroupByBoxVisible = False
   SGGrid1.Width = 1200
   SGGrid1.ScrollBars = sgSBNone
   SGGrid1.FocusRect = sgFocusRectNone
   SGGrid1.FitLastColumn = True
   'cols and row creation
   SGGrid1.Columns.RemoveAll True
   SGGrid1.HeadingRowCount = 0
   SGGrid1.DataRowCount = 5
   SGGrid1.DataColCount = 1
   
   With SGGrid1.Columns.At(0)
      For i = 1 To 5
         .ValueItems.Add i, "Row " & Trim(i), sgbipFirst + i + 3
      Next
   End With
   
   ScrollRows SGGrid1.Rows.At(2)
   SGGrid1.RedrawEnabled = True
End Sub

Private Sub SGGrid1_MouseDown _
   (Button As Integer, Shift As Integer, _
   x As Single, y As Single)
   Dim cell As Variant
   
   If SGGrid1.HitTestObject(x, y, cell) = sgHitCell Then
      If cell.row.Style = "Normal" Then Exit Sub
      ScrollRows cell.row
   End If
End Sub


Back to topic

Referenced By

SGRows.Item | SGGroupHeading.Row | SGRowCollection.Item | SGCell.Row