Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

Code in a button and in toolbar

$
0
0
I used code below in a button to get all checkbox value and then assign to a arraylist. It works fine.
But, once copied it to a tollbar, arraylist only store first value.
Is my code wrong?

Dim aList As New ArrayList

Dim CheckedRows As List(Of DataGridViewRow) = gridview1.GetChecked("Select")

If CheckedRows.Count <> 0 Then

Dim sList As String = ""

For Each item In CheckedRows

aList.Add(item.Cells("ID").Value.ToString)

Next

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>