0
I have the following code inside the Itemchecked event:
private void lsvRecebeGrupoLayout_ItemChecked(object sender, ItemCheckedEventArgs e)
{
Layout lay = new Layout();
GrupoLayout grupo = new GrupoLayout();
RepositorioGrupoLayout rgl = new RepositorioGrupoLayout();
RepositorioLayout repolay = new RepositorioLayout();
int idcbo = Convert.ToInt32(cboCarregaGrupo.SelectedValue);
foreach (ListViewItem x in lsvRecebeGrupoLayout.CheckedItems)
{
int idlayout = Convert.ToInt32(x.SubItems[0].Text);
lay = repolay.ConsultaPorId(idlayout);
grupo.Id = idcbo;
lay.GrupoLayout = grupo;
if (x.Checked)
{
repolay.Alterar(lay);
}
}
}
When the checkbox is clicked it makes a change in the bank and stays checked. How could I do so when the same checkbox that was clicked performs another operation as soon as it receives another click? That would remove the marking.
tried to use the Selectedindexchanged event? Because it is thus possible to check whether the item has been marked or not if it has been marked executes this code snippet if not.. does what you need to do.
– Tozzi
I even tried, but when I installed listview, it says that his checkbox is read-only.
– user93952