ColumnPreferenceList.Preference¶
Preference is a public class nested inside ColumnPreferenceList. 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
ColumnPreferenceListcan serialize/deserialize a full column selection one entry at a time. (BR-AJAX-039) - Provides an overload of
Equalsthat compares by column key alone, lettingColumnPreferenceList.Contains(String)detect duplicate/existing entries for a given column without needing a fullPreferenceinstance.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics111(packaged inSAIF.BOF.Presentation.Web.Infragistics111) - Declared as a nested type of
ColumnPreferenceList, which is itself aGeneric.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¶
ColumnKeyhas no public setter, so aPreference's target column cannot be changed after construction; onlyIsSelectedis mutable.- The
Equals(String)overload is column-key-based only and does not overrideObject.Equals, so standard collection equality/hashing forPreferenceinstances is unaffected by this method.*
Constraints and usage notes¶
- Instances are created either directly via
New(columnKey, isSelected)or indirectly throughColumnPreferenceList.Add(columnKey, isSelected), which is the pattern used when parsing a persisted preference string or aListItemCollection.
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