Skip to content

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

  1. For each managed column whose mode is Normal: if it should be visible and is not currently in the grid's Columns collection, insert it at the customizer's own index position; if it should be hidden and is present, remove it. (BR-AJAX-040)
  2. Columns whose mode is AlwaysVisible or AlwaysHidden are left untouched. (BR-AJAX-028)
  3. When ControlPaging is set, force AllowPaging = True, raise MinimumPagesForDisplay to 2 if it is lower, and set PageSize from 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 AlwaysVisible or AlwaysHidden are 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 Columns collection entirely (its data is not sent to the client), rather than merely styling it hidden. (BR-AJAX-040)

Sources

  • SAIF.Presentation.Web.Controls.AJAX.Infragistics111/InfragisticsGridCustomizer.vb