Apply column and page settings to the grid¶
This operation reconciles the customizer's desired column visibility and paging state against the live UltraWebGrid, inserting or removing columns and adjusting paging settings accordingly.
| Field | Value |
|---|---|
| Operation ID | OP-AJAX-10 |
| Trigger | Called from Initialize a grid customizer and after Customize grid columns via the modal popup |
| Inputs | HidableInfragisticsColumn list, PageSize, ControlPaging |
| Outputs | Grid's Columns collection and paging settings updated |
| Primary components | InfragisticsGridCustomizer.ManipulateGrid |
| Entry point | SAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb |
Steps¶
- For each managed column whose mode is
Normal: if it should be visible and is not currently in the grid'sColumnscollection, insert it at the customizer's own index position; if it should be hidden and is present, remove it. (BR-AJAX-040) - Columns whose mode is
AlwaysVisibleorAlwaysHiddenare left untouched. (BR-AJAX-028) - When
ControlPagingis set, forceAllowPaging = True, raiseMinimumPagesForDisplayto 2 if it is lower, and setPageSizefrom the customizer. (BR-AJAX-041)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([ManipulateGrid called]) --> Loop[For each column with mode Normal]
Loop --> Visible{Should be visible?}
Visible -->|Yes| InGrid{Already in Columns?}
InGrid -->|No| Insert[Insert column at customizer index]
InGrid -->|Yes| NoOp1([No change])
Visible -->|No| Present{Present in Columns?}
Present -->|Yes| Remove[Remove column from Columns]
Present -->|No| NoOp2([No change])
Insert --> Paging{ControlPaging set?}
Remove --> Paging
NoOp1 --> Paging
NoOp2 --> Paging
Paging -->|Yes| Force["Force AllowPaging True, MinimumPagesForDisplay >= 2, set PageSize"]
Paging -->|No| EndOk([Grid state applied])
Force --> EndOk
Failure and edge-case behavior¶
- Columns marked
AlwaysVisibleorAlwaysHiddenare never inserted or removed by this operation, regardless of the customizer's own visibility flag. (BR-AJAX-028) - Hiding a column removes it from the grid's
Columnscollection entirely (its data is not sent to the client), rather than merely styling it hidden. (BR-AJAX-040)
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb