Table of Contents

Class MatrixCellView

Namespace
Dynamicweb.Ecommerce.Products.Categories
Assembly
Dynamicweb.Ecommerce.dll

One matrix cell as an editor needs to render it: the value in force, and the value it would fall back to if the coordinate being edited held nothing.

public sealed record MatrixCellView : IEquatable<MatrixCellView>
Inheritance
MatrixCellView
Implements
Inherited Members

Remarks

A separate type from MatrixFieldValue, which is the stored shape feeds and the product view model serialise and must stay free of editing concerns. Nothing here is authoritative: the editor uses InheritedValue only to decide whether to mark the cell inherited, and a save re-reads the store and reaches its own verdict rather than trusting anything that came back through a client.

Constructors

MatrixCellView(string, int, int, string?, string?)

One matrix cell as an editor needs to render it: the value in force, and the value it would fall back to if the coordinate being edited held nothing.

public MatrixCellView(string ColumnId, int RowId, int SortOrder, string? Value, string? InheritedValue)

Parameters

ColumnId string

The column's fully-qualified unique id (ProductCategory|{categoryId}|{fieldId}).

RowId int

The id of the stored row the cell belongs to. Unlike SortOrder it stays with the row when the rows are reordered, so an editor round-trips it as RowId and a save can tell a moved row from a new one. On a product whose groups define the rows it is the group row's id.

SortOrder int

The row's position in the grid.

Value string

The value in force at the coordinate being edited.

InheritedValue string

What the cell would resolve to if the coordinate held nothing, or null when there is nothing to inherit. Equal to Value exactly when the cell is showing an inherited value.

Remarks

A separate type from MatrixFieldValue, which is the stored shape feeds and the product view model serialise and must stay free of editing concerns. Nothing here is authoritative: the editor uses InheritedValue only to decide whether to mark the cell inherited, and a save re-reads the store and reaches its own verdict rather than trusting anything that came back through a client.

Properties

ColumnId

The column's fully-qualified unique id (ProductCategory|{categoryId}|{fieldId}).

public string ColumnId { get; init; }

Property Value

string

InheritedValue

What the cell would resolve to if the coordinate held nothing, or null when there is nothing to inherit. Equal to Value exactly when the cell is showing an inherited value.

public string? InheritedValue { get; init; }

Property Value

string

RowId

The id of the stored row the cell belongs to. Unlike SortOrder it stays with the row when the rows are reordered, so an editor round-trips it as RowId and a save can tell a moved row from a new one. On a product whose groups define the rows it is the group row's id.

public int RowId { get; init; }

Property Value

int

SortOrder

The row's position in the grid.

public int SortOrder { get; init; }

Property Value

int

Value

The value in force at the coordinate being edited.

public string? Value { get; init; }

Property Value

string
To top