Table of Contents

Class GridColumnViewModel

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

Represents a view model for a grid column

public class GridColumnViewModel : ViewModelBase
Inheritance
GridColumnViewModel
Inherited Members

Properties

ColumnNumber

Gets or sets the column number.

public int ColumnNumber { get; }

Property Value

int

1 for first column in the row, 2 for second and so forth

ColumnNumberMobile

Gets or sets the column number for mobile devices.

public int? ColumnNumberMobile { get; }

Property Value

int?

1 for first column in the row, 2 for second and so forth

Remarks

When looping the columns in a row, the mobile sort order can be different and this property will reflect that. E.g. that column 2 should render before column 1 in mobile view

ColumnWidth

Gets or sets the column width.

public int ColumnWidth { get; }

Property Value

int

Normal values are 12, 6, 4, 3, 2

Remarks

The column width is out the total number of columns in a row. E.g. a row is 12 columns in total, and the size of this column will be 6 out of 12. A width of 12 = 100% width, 6 = 50% width, 4 = 33.33% width, 3 = 25% width, 2 = 16.66% width

ColumnWidthMobile

Gets or sets the column width for mobile devices.

public int? ColumnWidthMobile { get; }

Property Value

int?

Normal values are 12, 6, 4

Remarks

The column width is out the total number of columns in a row. E.g. a row is 12 columns in total, and the size of this column will be 6 out of 12. A width of 12 = 100% width, 6 = 50% width, 4 = 33.33% width

FitToContent

Gets or sets the column width behaviour.

public bool FitToContent { get; }

Property Value

bool

Paragraph

Gets the paragraph information in the form of the ParagraphInfoViewModel of the paragraph being rendered in this column.

public ParagraphInfoViewModel? Paragraph { get; }

Property Value

ParagraphInfoViewModel

RowColumnCount

Gets or sets the row column count.

public int RowColumnCount { get; }

Property Value

int

Normal values are 1-6

Remarks

A value of 2 means that the row has 2 columns

Methods

Output()

Gets the content of the column and its belonging paragraph in markup.

public string Output()

Returns

string

A html string of the rendered paragraph and its item using the chosen paragraph template.

See Also

To top