Skip to content

Initialize a grid customizer

This operation resolves or creates the InfragisticsGridCustomizer for a target UltraWebGrid, restores any saved page-size and column-selection preferences, and applies the resulting state to the grid.

Field Value
Operation ID OP-AJAX-08
Trigger First (non-postback) page load
Inputs Model's GridCustomizers list, TargetControls.GridId, AlwaysVisibleColumns / AlwaysHiddenColumns, saved IGC_<gridId>_* preferences
Outputs An InfragisticsGridCustomizer instance with its column list initialized and applied to the grid
Primary components ModalGridCustomizer.ModalGridCustomizer_Load, GridCustomizer property, InfragisticsGridCustomizer.New
Entry point SAIF.Presentation.Web.Controls.AJAX.Infragistics111/ModalGridCustomizer.vb

Steps

  1. On a non-postback load, read the GridCustomizer property.
  2. That property resolves the model's GridCustomizers list by reflection and looks up an entry keyed by TargetControls.GridId; if absent it constructs a new InfragisticsGridCustomizer and adds it. (BR-AJAX-021)
  3. On failure: a missing target grid or missing object binder throws ApplicationException from the respective reflection property.
  4. The constructor splits the designer-supplied AlwaysVisibleColumns / AlwaysHiddenColumns semicolon lists, resolves the target grid, and records ControlPaging.
  5. Page size is taken from the saved IGC_<gridId>_PageSize preference when paging is controlled and a value exists; otherwise from the grid's own pager when AllowPaging is set; otherwise the default of 50. (BR-AJAX-022, BR-AJAX-023)
  6. InitializeColumnList first validates that every override key names a real grid column, throwing ApplicationException("Grid <id> does not contain column visibility override column <key>") otherwise. (BR-AJAX-024)
  7. Each UltraGridColumn is wrapped in a HidableInfragisticsColumn whose initial visibility is Not (Hidden Or ServerOnly) and whose mode comes from the override lists. Always-hidden columns are forced to ServerOnly; all others have Hidden and ServerOnly cleared. (BR-AJAX-025, BR-AJAX-026)
  8. LoadColumnPreferences parses the saved IGC_<gridId>_ColumnSelection string and applies each remembered selection, skipping keys no longer present in the grid and columns whose mode is not Normal. (BR-AJAX-027, BR-AJAX-028)
  9. ManipulateGrid then applies the resulting state to the live grid.
  10. See Apply column and page settings to the grid for the detailed logic of this sub-step.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Non-postback page load]) --> Resolve[Resolve GridCustomizers list entry by GridId]
    Resolve --> Found{Entry found?}
    Found -->|No| New[Construct new InfragisticsGridCustomizer]
    Found -->|Yes| Reuse[Reuse existing customizer]
    New --> PageSize[Determine page size: saved pref, grid pager, or default 50]
    PageSize --> Validate[Validate override column keys exist]
    Validate --> Wrap[Wrap columns as HidableInfragisticsColumn]
    Wrap --> LoadPrefs[Apply saved IGC_ ColumnSelection preferences]
    LoadPrefs --> Manipulate[ManipulateGrid applies state to live grid]
    Reuse --> Manipulate
    Manipulate --> EndOk([Grid customizer initialized])

Failure and edge-case behavior

  • An override column key that does not exist on the target grid throws ApplicationException naming the grid and the offending column. (BR-AJAX-024)
  • A missing target grid or missing object binder throws ApplicationException from the respective reflection property.*
  • A saved column-selection preference naming a column no longer present in the grid is ignored rather than causing an error. (BR-AJAX-027)

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/ModalGridCustomizer.vb
  • SAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb