0
I put a List<string>
just by example, but the idea is this:
List<string> Selecionados = new List<string>();
private void buttonAdicionar_Click(object sender, EventArgs e)
{
if (dataGridView1.SelectedRows.Count >0)
{
string item = dataGridView1.SelectedRows[0].Cells["ColunaItem"].Value.ToString();
//Adiciona outras propriedades, quantidades, etc...
Selecionados.Add(item);
//update no dataGridView2
}
}
How does the data Binding for the first Datagrid?
– Jéf Bueno
'var source = new Bindingsource(); List<Data> Dataosbo.Getusuario(User.idUsuario); // Takes all user data. source.datasource = data; datagridview.datasource = source;'
– Danillo Victtor
Why not grab the click on the cell, check which ID of the
Dado
, search in the bank and feed a list that will serve as Binding for the second Datagrid?– Jéf Bueno