Skip to content

Build and fill the conditions grid

Provide a pre-built, reusable grid panel for displaying medical-conditions-shaped data. CreateChildControls on first use; Fill when the host page has a CollectionBase to display; OnPreRender on every render.

Field Value
Operation ID OP-V2-008
Trigger CreateChildControls on first use; Fill when the host page has a CollectionBase to display; OnPreRender on every render.
Inputs Caller-supplied System.Collections.CollectionBase.
Outputs A SAIFPanel-hosted, explicitly-columned GridView titled "Medical Conditions".
Primary components ConditionsGrid
Entry point SAIF.Presentation.Web.Controls.V2/ConditionsGrid.vb

Steps

  1. On CreateChildControls, when the control has no children, create a SAIFPanel named pnlConditions titled Medical Conditions, containing an auto-scrolling Panel and a GridView (dgConditions) with SAIF CSS classes and explicit columns, sized 23 pixels narrower than the control. (BR-V2-052, BR-V2-053)
  2. Origin: The panel is built with SAIFPanel (this library, OP-V2-007).

  3. Fill(inDataSource As CollectionBase) locates the panel and grid, assigns the supplied collection as the grid data source, data-binds and sorts it. (BR-V2-054)
  4. The caller supplies an already-materialized business collection; the control performs no data access.
  5. On OnPreRender, overwrite the grid's ID attribute with the fully qualified ClientID_panelID_gridID so the jQuery script can find it, and set the scroll panel height to 110 pixels when the grid has four or more rows. (BR-V2-055, BR-V2-056)
  6. Both CreateChildControls and Fill wrap their bodies in a Try/Catch block with empty catch handlers. (BR-V2-057)
  7. On failure: the exception is swallowed silently; no error is surfaced to the host page or log.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([CreateChildControls]) --> Empty{No children yet?}
    Empty -->|Yes| Build[Build SAIFPanel + GridView with explicit columns]
    Empty -->|No| Skip[Skip rebuild]
    Build --> FillCall([Host calls Fill])
    Skip --> FillCall
    FillCall --> Bind[Assign data source, DataBind, Sort]
    Bind --> Pre[OnPreRender: rewrite ID, size scroll region]
    Pre --> Done([Rendered])

Failure and edge-case behavior

  • On failure: the exception is swallowed silently; no error is surfaced to the host page or log.

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.V2/ConditionsGrid.vb