All pastes #242370 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-11-07 04:29 UTC
rendered paste body
  'define a datarow object to hold a record from Toppings table
        Dim row As PizzaDataSet.ToppingsRow
        'go through all the rows in the table
        For Each row In Me.PizzaDataSet.Toppings.Rows
            Dim chk As New CheckBox
            chk.Name = "CheckBox" & row.ToppingID
            chk.Text = row.ToppingName
            chk.AutoSize = True
            If row.ToppingCategory = "Meat" Then
                Me.fpmeat.Controls.Add(chk)
            Else
                Me.fpveggie.Controls.Add(chk)
            End If
            AddHandler chk.CheckedChanged, AddressOf ToppingCheckChanged
        Next