Question Selecting DataGridViewRows using LINQ

Lotok

Well-known member
Joined
Jan 17, 2012
Messages
198
Location
Scotland
Programming Experience
5-10
I am maybe having an off day here and doing something daft.
I am trying to select some DGVRs from one datagridview to another using LINQ.

I already have a databound table containing the data, this other table shows a subset of the information. So I am querying the existing table and applying the results to the other table as below

                    Dim assigned = From r As DataGridViewRow In MainTable.Rows
                                   Where r.Cells("AssignedTo").Value = Environment.UserName
                                   Select r

                    PersonalTable.Rows.AddRange(assigned.ToArray())
                    PersonalTable.Update()


I get an InvalidOperation Exception when this runs
 
Back
Top