string FilterCaption = dsContactFilters.Tables[0].Rows[0]["Caption"].ToString();
inside the foreach keeps setting the value to the exact same row; first row?>>>private void _LoadContactFilters() >>>{ >>> SqlParameter pContactId = new SqlParameter("@ContactId", _Contact.RecordId); >>> List<DbParameter> Params = new List<DbParameter>(); >>> Params.Add(pContactId); >>> >>> DataSet dsContactFilters = csMain.DataProcs.ExecuteQuery("lb_GetFiltersForContact", Params, CommandType.StoredProcedure); >>> if (dsContactFilters.Tables[0].Rows.Count > 0) >>> { >>> foreach (DataRow Row in dsContactFilters.Tables[0].Rows) >>> { >>> string FilterCaption = dsContactFilters.Tables[0].Rows[0]["Caption"].ToString(); >>> >>> for (int i = 0; i < chklFilters.Items.Count; i++) >>> { >>> if (chklFilters.Items[i].ToString() == FilterCaption) >>> { >>> chklFilters.SetItemChecked(i, true); >>> break; >>> } >>> } >>> } >>> } >>>} >>>