mardi 12 février 2019

Checkbox in datalist

Here is my code

 List<DataRow> rows = new List<DataRow>();
    foreach (DataListItem item in DataList1.Items)
    {            
        if (!(item.FindControl("Cb1") as CheckBox).Checked)
        {
            rows.Add(dt.Rows[item.ItemIndex]);
        }
    }        
    foreach (DataRow row in rows)
    {
        dt.Rows.Remove(row);
    }

After button click I want to uncheck selected Checkboxes




Aucun commentaire:

Enregistrer un commentaire