---
title: GridViewModel
summary: API reference for GridViewModel.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# GridViewModel

Shape for an editable data grid, separating the rows currently displayed from three pending-change collections (added, deleted, updated) that a save operation consumes and `GridRowViewModelExtensions.ClearAll` resets.

## Purpose
- Shape for an editable data grid, separating the rows currently displayed from three pending-change collections (added, deleted, updated) that a save operation consumes and `GridRowViewModelExtensions.ClearAll` resets.

## Context
- Namespace: `SAIF.Web.Mvc.ViewModels`
- Assembly/package: `SAIF.Framework.Web.Mvc (source-shipping NuGet package)`
- Kind: class (generic, T)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Rows | `public IList<T> Rows { get; set; }` | The rows currently displayed in the grid. |
| Added | `public IList<T> Added { get; set; }` | Rows pending insertion on the next save. |
| Deleted | `public IList<T> Deleted { get; set; }` | Rows pending deletion on the next save. |
| Updated | `public IList<T> Updated { get; set; }` | Rows pending update on the next save. |

## Behavioral notes
- Model-state keys under `.Added[`, `.Deleted[`, or `.Updated[` are deliberately excluded from grid-row error correlation (see [BR-34](../../business-rules.md#br-34-pending-change-grid-keys-are-not-correlated-to-a-row)).

## Sources
- `src/Web.Mvc/ViewModels/GridViewModel.cs`
