Skip to content

ColumnPreferenceList

ColumnPreferenceList serializes and deserializes a grid's column-visibility selections to/from a compact, semicolon/period-delimited string, letting InfragisticsGridCustomizer persist and reload user preferences through clsPreferences without needing a structured storage format.

Purpose

  • Converts a checkbox-list selection (ListItemCollection or Generic.List(Of ListItem)) into a delimited preference string via ToString(), and parses that same string format back into structured Preference entries via its string constructor.
  • Provides duplicate-safe Add overloads so the same column key is never recorded twice in a preference list.

Context

  • Namespace: SAIF.Presentation.Web.Controls.V2.AJAX
  • Assembly/package: SAIF.Presentation.Web.Controls.AJAX.Infragistics103

Public members

Member Signature Purpose
DefaultColumnDataDelimiter Public Const DefaultColumnDataDelimiter As Char = ";"c Delimiter separating individual column preference entries
DefaultColumnDataSubDelimiter Public Const DefaultColumnDataSubDelimiter As Char = "."c Delimiter separating a column key from its selected-state flag within one entry
New (ListItemCollection) Sub New(inListItems As ListItemCollection) Builds the preference list from a checkbox-list control's items and their selected state
New (Generic.List(Of ListItem)) Sub New(inListItems As Generic.List(Of ListItem)) Builds the preference list from an in-memory list of ListItems and their selected state
New (String) Sub New(inColumnPreferenceData As String) Parses a previously-serialized preference string back into structured Preference entries
ToString Overrides Function ToString() As String Serializes the current preference entries into the delimited string format used for persistence
Add (Preference) Shadows Function Add(inColumnPreference As Preference) As Boolean Adds a preference entry, returning False if a preference for that column key already exists
Add (String, Boolean) Shadows Function Add(inColumnKey As String, inIsSelected As Boolean) As Boolean Adds a preference entry by column key and selected flag, guarding against duplicates
Contains Overloads Function Contains(inColumnKey As String) As Boolean Indicates whether a preference entry already exists for the given column key

Inherited public members

Members in this section are inherited from Generic.List(Of Preference) in the .NET Framework Base Class Library. They are available on this type through inheritance.

Member Signature Purpose Origin
Count ReadOnly Property Count As Integer The number of preference entries currently in the list mscorlib — System.Collections.Generic.List(Of T)
Item Default Property Item(index As Integer) As Preference Positional access to a parsed column-key/selected-state entry, used when replaying or rewriting entries by position mscorlib — System.Collections.Generic.List(Of T)
Remove Function Remove(item As Preference) As Boolean Removes the first occurrence of the given preference entry from the list mscorlib — System.Collections.Generic.List(Of T)
Clear Sub Clear() Removes all preference entries from the list mscorlib — System.Collections.Generic.List(Of T)
GetEnumerator Function GetEnumerator() As List(Of Preference).Enumerator Supports For Each iteration over the preference entries mscorlib — System.Collections.Generic.List(Of T)

Behavioral notes

  • ToString() trims the trailing delimiter from the final serialized string, so an empty list would raise an index-out-of-range error if called with zero entries*.

Constraints and usage notes

  • The string constructor expects exactly the delimiter format produced by ToString(); malformed input (missing sub-delimiter) will throw an index error when parsing columnData(1).

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.Infragistics103\InfragisticsGridCustomizer.vb