Skip to content

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).

Sources

  • src/Web.Mvc/ViewModels/GridViewModel.cs