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

# InfragisticsGridCustomizer

`InfragisticsGridCustomizer` is the actual state holder behind grid customization: a list of [HidableInfragisticsColumn](HidableInfragisticsColumn.md) wrappers plus page-size/paging state for one `UltraWebGrid`. [ModalGridCustomizer](ModalGridCustomizer.md) creates and caches one instance per grid on the model (via [InfragisticsGridCustomizerList](InfragisticsGridCustomizerList.md)), and this class is where saved `clsPreferences` are read on construction, applied to the live grid (`ManipulateGrid`), updated from user choices (`Update`), and written back out (`SavePreferences`). ([BR-AJAX-021](../../business-rules.md#br-ajax-021-grid-customization-state-is-created-once-per-grid-per-model-and-reused))

## Purpose
- Reads a saved page size from `clsPreferences` when paging is controlled, otherwise falls back to the grid's own pager setting, otherwise defaults to 50 rows. ([BR-AJAX-022](../../business-rules.md#br-ajax-022-a-saved-page-size-overrides-the-designed-page-size-when-the-customizer-controls-paging), [BR-AJAX-023](../../business-rules.md#br-ajax-023-page-size-defaults-to-50-rows-paging-shown-only-at-two-or-more-pages))
- Validates that every always-visible/always-hidden override names a real grid column, and wraps each column as a `HidableInfragisticsColumn` with its initial visibility derived from the grid definition. ([BR-AJAX-024](../../business-rules.md#br-ajax-024-every-override-column-must-exist-on-the-target-grid), [BR-AJAX-025](../../business-rules.md#br-ajax-025-a-columns-initial-visibility-is-derived-from-the-grid-definition))
- Loads any saved column-selection preference, applying only to columns still present and in `Normal` visibility mode. ([BR-AJAX-027](../../business-rules.md#br-ajax-027-a-saved-preference-for-a-removed-column-is-ignored), [BR-AJAX-028](../../business-rules.md#br-ajax-028-always-visible-or-always-hidden-columns-cannot-be-changed))
- Applies the resolved state to the live grid — inserting/removing columns and forcing paging settings — through `ManipulateGrid`. ([BR-AJAX-040](../../business-rules.md#br-ajax-040-hiding-a-column-removes-it-entirely-re-showing-reinserts-it-at-its-original-position), [BR-AJAX-041](../../business-rules.md#br-ajax-041-customizer-controlled-paging-is-always-switched-on))
- Persists the current selection and page size into `clsPreferences` when the user explicitly saves. ([BR-AJAX-039](../../business-rules.md#br-ajax-039-only-save-as-default-persists-grid-preferences))

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2.AJAX`
- Assembly/package: `SAIF.Presentation.Web.Controls.AJAX.Infragistics111` (packaged in `SAIF.BOF.Presentation.Web.Infragistics111`)
- Base class: `Generic.List(Of HidableInfragisticsColumn)` (.NET Framework)
- Consumes `clsPreferences` from `SAIF.Framework.Preferences` (package `SAIF.BOF.Framework`) and `SAIF.Framework.StandardFormats.PadCapitalLettersFormat` from `SAIF.Framework`.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New` | `Sub New(grid As UltraGridColumn(), alwaysVisible As String, alwaysHidden As String, controlPaging As Boolean, preferences As clsPreferences)` | Splits override lists, resolves the target grid, records `ControlPaging`, determines page size, validates and wraps columns, and loads saved preferences |
| `PageSize` | `Property PageSize As Integer` (default `50`) | Current page size applied to the grid when `ControlPaging` is set ([BR-AJAX-023](../../business-rules.md#br-ajax-023-page-size-defaults-to-50-rows-paging-shown-only-at-two-or-more-pages)) |
| `ControlPaging` | `ReadOnly Property ControlPaging As Boolean` | Whether this customizer controls the grid's paging |
| `TargetGridId` | `ReadOnly Property TargetGridId As String` | ID of the `UltraWebGrid` this instance manages |
| `ListItems` | `Function ListItems() As ListItem()` | Builds one `ListItem` per selectable column for the customization popup, skipping always-hidden columns ([BR-AJAX-032](../../business-rules.md#br-ajax-032-always-hidden-columns-are-not-offered-to-the-user), [BR-AJAX-033](../../business-rules.md#br-ajax-033-a-column-with-no-header-caption-is-labeled-from-its-key), [BR-AJAX-034](../../business-rules.md#br-ajax-034-always-visible-columns-appear-checked-but-disabled)) |
| `VisibleItems` | `ReadOnly Property VisibleItems As Generic.List(Of HidableInfragisticsColumn)` | The subset of managed columns currently marked visible |
| `PreferenceData` | `ReadOnly Property PreferenceData As String` | The `ColumnPreferenceList` string form of the current selection, as persisted to `clsPreferences` |
| `Update` | `Sub Update(selections As Generic.IEnumerable(Of String), pageSize As Integer)` | Applies the user's checkbox selections and page-size choice to the managed column list, honoring `AlwaysVisible`/`AlwaysHidden` locks ([BR-AJAX-028](../../business-rules.md#br-ajax-028-always-visible-or-always-hidden-columns-cannot-be-changed)) |
| `ManipulateGrid` | `Sub ManipulateGrid()` | Inserts/removes columns on the live grid to match managed visibility, and forces paging settings when `ControlPaging` is set ([BR-AJAX-040](../../business-rules.md#br-ajax-040-hiding-a-column-removes-it-entirely-re-showing-reinserts-it-at-its-original-position), [BR-AJAX-041](../../business-rules.md#br-ajax-041-customizer-controlled-paging-is-always-switched-on)) |
| `BindGrid` | `Sub BindGrid()` | Raises the grid-rebind step used after customization |
| `BindObjectBinder` | `Sub BindObjectBinder(binder As Object)` | Invokes the supplied `clsObjectBindManager` to rebind the grid from the model |
| `SavePreferences` | `Sub SavePreferences(preferences As clsPreferences)` | Writes `IGC_<gridId>_ColumnSelection` and `IGC_<gridId>_PageSize` into `clsPreferences` and calls `Preferences.Save()` ([BR-AJAX-039](../../business-rules.md#br-ajax-039-only-save-as-default-persists-grid-preferences)) |
| `DefaultPageSize` | `Const DefaultPageSize As Integer = 50` | Page size used when no saved preference or grid pager setting is available ([BR-AJAX-023](../../business-rules.md#br-ajax-023-page-size-defaults-to-50-rows-paging-shown-only-at-two-or-more-pages)) |
| `MinimumPagesForDisplay` | `Const MinimumPagesForDisplay As Integer = 2` | Minimum page count before the grid's pager is shown ([BR-AJAX-023](../../business-rules.md#br-ajax-023-page-size-defaults-to-50-rows-paging-shown-only-at-two-or-more-pages)) |

### Nested types

| Type | Kind | Purpose |
| --- | --- | --- |
| `VisiblityModes` | Enum (`Normal`, `AlwaysVisible`, `AlwaysHidden`) | Per-column mode that governs whether the user or saved preferences can change a column's visibility ([BR-AJAX-028](../../business-rules.md#br-ajax-028-always-visible-or-always-hidden-columns-cannot-be-changed)) |

<!-- SELF-CONTAINMENT: base type Generic.List(Of HidableInfragisticsColumn) is a .NET Framework generic collection, not part of this repository's own doc set; no Inherited public members section is produced. -->

## Behavioral notes
- A missing override column throws `ApplicationException` naming the grid and the offending column, so misconfigured `AlwaysVisibleColumns`/`AlwaysHiddenColumns` fail fast at construction. ([BR-AJAX-024](../../business-rules.md#br-ajax-024-every-override-column-must-exist-on-the-target-grid))
- A saved column-selection preference naming a column no longer present in the grid is ignored rather than causing an error, so renamed/removed columns do not break the page. ([BR-AJAX-027](../../business-rules.md#br-ajax-027-a-saved-preference-for-a-removed-column-is-ignored))
- Hiding a column via `ManipulateGrid` removes it from the grid's `Columns` collection entirely rather than merely styling it hidden, so hidden column data is never sent to the client. ([BR-AJAX-040](../../business-rules.md#br-ajax-040-hiding-a-column-removes-it-entirely-re-showing-reinserts-it-at-its-original-position))

## Constraints and usage notes
- Instances are intended to be created once per grid per model and cached in an `InfragisticsGridCustomizerList`, not re-created on every postback. ([BR-AJAX-021](../../business-rules.md#br-ajax-021-grid-customization-state-is-created-once-per-grid-per-model-and-reused))
- Columns whose `VisiblityMode` is not `Normal` are never inserted or removed by `ManipulateGrid`, regardless of the caller's requested visibility. ([BR-AJAX-028](../../business-rules.md#br-ajax-028-always-visible-or-always-hidden-columns-cannot-be-changed))

## Related documentation
- [Index](../../index.md)
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Business rules](../../business-rules.md)
- [Operations and processes](../../operations-processes.md)
- [API reference](../index.md)

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