Class GoogleAppsCardV1Grid
Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to
include more than text or images, use Columns. For an example in Google Chat apps, see Display a Grid with a
collection of
items.
A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A
grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Google Workspace
add-ons and Chat apps: For example, the following JSON creates
a 2 column grid with a single item:
"grid": { "title": "A fine collection of items", "columnCount": 2,
"borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri":
"https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } },
"title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" }
} }
Implements
Inherited Members
Namespace: Google.Apis.HangoutsChat.v1.Data
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class GoogleAppsCardV1Grid : IDirectResponseSchema
Properties
BorderStyle
The border style to apply to each grid item.
Declaration
[JsonProperty("borderStyle")]
public virtual GoogleAppsCardV1BorderStyle BorderStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| GoogleAppsCardV1BorderStyle |
ColumnCount
The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).
Declaration
[JsonProperty("columnCount")]
public virtual int? ColumnCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Items
The items to display in the grid.
Declaration
[JsonProperty("items")]
public virtual IList<GoogleAppsCardV1GridItem> Items { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<GoogleAppsCardV1GridItem> |
OnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
Declaration
[JsonProperty("onClick")]
public virtual GoogleAppsCardV1OnClick OnClick { get; set; }
Property Value
| Type | Description |
|---|---|
| GoogleAppsCardV1OnClick |
Title
The text that displays in the grid header.
Declaration
[JsonProperty("title")]
public virtual string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |