T
tracaja
Guest
Hy, I´m having difficulties on taking the checked values from the listview to the datagrid.
those listview lines should be inserted bellow another one, like its another item...
C#, SQL, bounded grid
I have got this far :
private void btnReservarPredio_Click(object sender, EventArgs e)
{
dgvCadEvento.AllowUserToAddRows = true;
dgvCadEvento.BeginEdit(true);
foreach (var item in listView1.SelectedItems.ToString())
{
DataRow addrow = bdVestibulinhoDataSet.evento.NewRow();
addrow[2] = item;
bdVestibulinhoDataSet.evento.Rows.InsertAt(addrow, 2);
}
}
it almost do what I want, but it creates 60 rows, not with the listview values
Continue reading...
those listview lines should be inserted bellow another one, like its another item...
C#, SQL, bounded grid
I have got this far :
private void btnReservarPredio_Click(object sender, EventArgs e)
{
dgvCadEvento.AllowUserToAddRows = true;
dgvCadEvento.BeginEdit(true);
foreach (var item in listView1.SelectedItems.ToString())
{
DataRow addrow = bdVestibulinhoDataSet.evento.NewRow();
addrow[2] = item;
bdVestibulinhoDataSet.evento.Rows.InsertAt(addrow, 2);
}
}
it almost do what I want, but it creates 60 rows, not with the listview values
Continue reading...