Skip to content

Replies

0
Ca
Ca answered on Mar 2, 2021 2:13 PM

It still gives problems because the secondary grid takes only certain fields with respect to the original one.

I don't know how to explain it better.


			
0
Ca
Ca answered on Mar 2, 2021 10:16 AM

Hi, 

I create a sub for selected rows like this:

Private Sub SelectedRows_GRD3()

Dim dt As DataTable = New DataTable()
For Each row In GRD3.Selected.Rows
Dim datarow As DataRow = dt.Rows.Add()
datarow(0) = row.Cells("DESCRI").Value
datarow(1) = row.Cells("U_ARPRZL").Value
datarow(2) = row.Cells("P1").Value
datarow(3) = row.Cells("QTA").Value

Next

grd3_stampa.DataSource = dt
GRD3.Selected.Rows.Clear()

End Sub

but give me an error like " System.IndexOutOfRangeException :impossible to found column 0"

How I can do?