---
title: ColumnPreferenceList.Preference
summary: API reference for ColumnPreferenceList.Preference.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.AJAX.Infragistics111
reference_type: package
---

# ColumnPreferenceList.Preference

`Preference` is a public class nested inside [ColumnPreferenceList](ColumnPreferenceList.md). Each instance is the smallest unit of persisted grid state: one grid column key paired with its checked (visible) or unchecked (hidden) state. `ColumnPreferenceList` is simply a strongly-typed list of these entries, and `InfragisticsGridCustomizer.LoadColumnPreferences` iterates them to restore a saved customization onto the live column set.

## Purpose
- Holds one column's key and its persisted checked/unchecked state as an immutable-key, mutable-state pair, so `ColumnPreferenceList` can serialize/deserialize a full column selection one entry at a time. ([BR-AJAX-039](../../business-rules.md#br-ajax-039-only-save-as-default-persists-grid-preferences))
- Provides an overload of `Equals` that compares by column key alone, letting `ColumnPreferenceList.Contains(String)` detect duplicate/existing entries for a given column without needing a full `Preference` instance.

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2.AJAX`
- Assembly/package: `SAIF.Presentation.Web.Controls.AJAX.Infragistics111` (packaged in `SAIF.BOF.Presentation.Web.Infragistics111`)
- Declared as a nested type of `ColumnPreferenceList`, which is itself a `Generic.List(Of Preference)`.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New` | `Sub New(inColumnKey As String, inIsSelected As Boolean)` | Creates a preference entry for the given column key with its initial checked state. |
| `ColumnKey` | `ReadOnly Property ColumnKey As String` | The grid column key this entry applies to; set once at construction and never changed. |
| `IsSelected` | `Property IsSelected As Boolean` | Whether the column is currently checked (visible) in the persisted/serialized form. |
| `Equals` | `Overloads Function Equals(inColumnKey As String) As Boolean` | Compares this entry's `ColumnKey` to the supplied key, used by `ColumnPreferenceList.Contains` to find an existing entry for a column. |

## Behavioral notes
- `ColumnKey` has no public setter, so a `Preference`'s target column cannot be changed after construction; only `IsSelected` is mutable.
- The `Equals(String)` overload is column-key-based only and does not override `Object.Equals`, so standard collection equality/hashing for `Preference` instances is unaffected by this method.*

## Constraints and usage notes
- Instances are created either directly via `New(columnKey, isSelected)` or indirectly through `ColumnPreferenceList.Add(columnKey, isSelected)`, which is the pattern used when parsing a persisted preference string or a `ListItemCollection`.

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb`
