I am using C # winforms with an MSSQL database. I have a table in the Pilots database, I populate the datagridview "dgvPilots", with data from the Pilots table.
dgvPilots.DataSource = Connection.dm.Pilots.ToList();
I turn on multiselect. now i need to get multitask data from datagridview. How can I display multisecond strings for a Pilots object and get PilotsID.
My current error is: "Cannot use DataGridViewRow object type to enter" .Data.Pilots "...
I am also trying to do it like
dgvPilots.SelectedRows.Cast<Pilots>().ToList();
but it returns the type of the DataGridViewRow element.
source
share