[C#]
CheckBoxList chkbx = (CheckBoxList)FormView1.FindControl("CheckBoxList1");
while (rdr.Read()){
ListItem currentCheckBox = chkbx.Items.FindByValue(rdr["ID"].ToString());
if (currentCheckBox != null){
currentCheckBox.Selected = true;
}
}
Referans: http://www.mikesdotnetting.com/Article/53/Saving-a-user%27s-CheckBoxList-selection-and-re-populating-the-CheckBoxList-from-saved-data
No comments:
Post a Comment