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¶
- On
CreateChildControls, when the control has no children, create aSAIFPanelnamedpnlConditionstitledMedical Conditions, containing an auto-scrollingPaneland aGridView(dgConditions) with SAIF CSS classes and explicit columns, sized 23 pixels narrower than the control. (BR-V2-052, BR-V2-053) -
Origin: The panel is built with
SAIFPanel(this library,OP-V2-007). 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)- The caller supplies an already-materialized business collection; the control performs no data access.
- On
OnPreRender, overwrite the grid'sIDattribute with the fully qualifiedClientID_panelID_gridIDso 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) - Both
CreateChildControlsandFillwrap their bodies in aTry/Catchblock with empty catch handlers. (BR-V2-057) - 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.
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.V2/ConditionsGrid.vb