Imports Telerik.WinControls.UI

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'NwindDataSet.Customers' table. You can move, or remove it, as needed.
        Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers)


    End Sub

    Private Function GetCheckedRows(ByVal grid As RadGridView) As List(Of GridViewRowInfo)
        Dim checkedRows As List(Of GridViewRowInfo) = New List(Of GridViewRowInfo)()
        For Each row As GridViewRowInfo In grid.Rows
            If Not row.Cells("column1").Value Is Nothing And Not row.Cells("column1").Value.Equals(DBNull.Value) Then
                If CBool(row.Cells("column1").Value) Then
                    checkedRows.Add(row)
                End If
            End If

        Next row
        Return checkedRows
    End Function


    Private Sub RadButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
        RadListBox1.Items.Clear()
        For Each row As GridViewRowInfo In GetCheckedRows(RadGridView1)
            RadListBox1.Items.Add(New RadListBoxItem(CStr(row.Cells("CompanyName").Value)))
        Next
    End Sub
End Class
