protected void uxCategoryList_ItemDataBound(object sender, DataListItemEventArgs e) { Components_CategoryCheckList catList = (Components_CategoryCheckList)e.Item.FindControl("uxCategoryCheckList"); if (catList != null) { catList.refresh(); } }
private string[] GetCategoryIDCheckInGrid(DataListItem item) { CheckBox categoryCheck = (CheckBox)item.FindControl("uxCategoryCheck"); Components_CategoryCheckList categoryCheckList = (Components_CategoryCheckList)item.FindControl("uxCategoryCheckList"); HiddenField id = (HiddenField)item.FindControl("uxCategoryIDHidden"); string[] checkedCategoryIDs; if (!categoryCheck.Checked) { checkedCategoryIDs = categoryCheckList.CheckedCategoryID(); } else { checkedCategoryIDs = new string[1]; checkedCategoryIDs[0] = id.Value; } return(checkedCategoryIDs); }