mercredi 31 août 2016

Checking only one item in a Listview

i need to check only one item using checkbox tool in a ListView as shown in the following code in the condition if :

 private void BindUnpaid()
{
  if (HiddenField2.Value == "1")
        {

            foreach (ListViewDataItem item in this.LstViewUnpaid.Items)
            {
                var chk = item.FindControl("IsChecked") as System.Web.UI.HtmlControls.HtmlInputCheckBox;

                chk.Disabled = false;

            }
}




Aucun commentaire:

Enregistrer un commentaire