---
title: SAIFGrid
summary: API reference for SAIFGrid.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2
reference_type: package
---

# SAIFGrid

A styled `GridView` that always carries the library's grid CSS class, renders an accessible header when it has rows, and can wire client-side row-click behavior keyed off `DataKeyField` [BR-V2-081](../../business-rules.md#br-v2-081-every-saifgrid-carries-the-saifgrid-css-class).

## Purpose
- Applies the `SAIFGrid` CSS class to every instance for consistent styling [BR-V2-081](../../business-rules.md#br-v2-081-every-saifgrid-carries-the-saifgrid-css-class).
- Wires client-side row-click attributes, but only once `DataKeyField` is populated [BR-V2-083](../../business-rules.md#br-v2-083-row-click-wiring-requires-a-populated-datakeyfield).
- Adds an accessible header scope only when the grid actually has rows [BR-V2-085](../../business-rules.md#br-v2-085-grids-with-rows-get-an-accessible-header).

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2`
- Assembly/package: `SAIF.Presentation.Web.Controls.V2` (packaged in `SAIF.BOF.Presentation.Web.Infragistics111.nuspec`)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| DataKeyField | `Public Property DataKeyField As String` | Field used as the per-row key for client-side row-click wiring; must be populated for row-click to activate [BR-V2-083](../../business-rules.md#br-v2-083-row-click-wiring-requires-a-populated-datakeyfield). |
| RowDataBound | `Protected Overrides Sub RowDataBound(e As GridViewRowEventArgs)` | Applies zebra-striping and, when `DataKeyField` is set, attaches the client-side row-click handler to each row. |
| PreRender | `Protected Overrides Sub OnPreRender(e As EventArgs)` | Applies the accessible header only when the grid has at least one row [BR-V2-085](../../business-rules.md#br-v2-085-grids-with-rows-get-an-accessible-header). |

## Constraints and usage notes
- Row-click wiring silently does nothing if `DataKeyField` is left blank [BR-V2-083](../../business-rules.md#br-v2-083-row-click-wiring-requires-a-populated-datakeyfield).

## Sources
- `SAIF.Presentation.Web.Controls.V2/SAIFGrid.vb`
