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¶
- On a non-postback load, read the
GridCustomizerproperty. - That property resolves the model's
GridCustomizerslist by reflection and looks up an entry keyed byTargetControls.GridId; if absent it constructs a newInfragisticsGridCustomizerand adds it. (BR-AJAX-021) - On failure: a missing target grid or missing object binder throws
ApplicationExceptionfrom the respective reflection property. - The constructor splits the designer-supplied
AlwaysVisibleColumns/AlwaysHiddenColumnssemicolon lists, resolves the target grid, and recordsControlPaging. - Page size is taken from the saved
IGC_<gridId>_PageSizepreference when paging is controlled and a value exists; otherwise from the grid's own pager whenAllowPagingis set; otherwise the default of 50. (BR-AJAX-022, BR-AJAX-023) InitializeColumnListfirst validates that every override key names a real grid column, throwingApplicationException("Grid <id> does not contain column visibility override column <key>")otherwise. (BR-AJAX-024)- Each
UltraGridColumnis wrapped in aHidableInfragisticsColumnwhose initial visibility isNot (Hidden Or ServerOnly)and whose mode comes from the override lists. Always-hidden columns are forced toServerOnly; all others haveHiddenandServerOnlycleared. (BR-AJAX-025, BR-AJAX-026) LoadColumnPreferencesparses the savedIGC_<gridId>_ColumnSelectionstring and applies each remembered selection, skipping keys no longer present in the grid and columns whose mode is notNormal. (BR-AJAX-027, BR-AJAX-028)ManipulateGridthen applies the resulting state to the live grid.- 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
ApplicationExceptionnaming the grid and the offending column. (BR-AJAX-024) - A missing target grid or missing object binder throws
ApplicationExceptionfrom 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)
Related documentation¶
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.vbSAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb