You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/view-formatting.md
+94-83Lines changed: 94 additions & 83 deletions
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,18 @@ You can use view formatting to customize how views in SharePoint lists and libra
12
12
> [!TIP]
13
13
> Samples demonstrated in this article and numerous other community samples are available from a GitHub repository dedicated for open-sourced list formatting definitions. You can find these samples in the [sp-dev-list-formatting](https://github.com/SharePoint/sp-dev-list-formatting) repository within the [SharePoint](https://github.com/SharePoint) GitHub organization.
14
14
15
+
>[!NOTE]
16
+
> View formatting is currently supported only in SharePoint Online.
17
+
15
18
## Get started with view formatting
16
19
17
20
To open the view formatting pane, open the view dropdown and choose **Format current view**.
> To enbale the 'Tiles' layout, include tileProps property inside the JSON.
24
+
> To enbale the 'Tile' layout, include `tileProps` property inside the JSON.
22
25
23
-
To format rows in 'List' or 'Compact List' layout, use the `rowFormatter` or `additionalRowClass` properties. To format entries in 'Tiles' layout, use the `formatter` within `tileProps` property.
26
+
To format rows in 'List' or 'Compact List' layout, use the `rowFormatter` or `additionalRowClass` properties. To format entries in 'Tile' layout, use the `formatter` within `tileProps` property.
24
27
25
28
26
29
The easiest way to use view formatting is to start from an example and edit it to apply to your specific view. The following sections contain examples that you can copy, paste, and customize for your specific needs. There are also several samples available in the [SharePoint/sp-dev-list-formatting repository](https://github.com/SharePoint/sp-dev-list-formatting).
@@ -138,99 +141,107 @@ This example uses the `rowFormatter` element, which totally overrides the render
138
141
You can find this sample with additional details here: [Multi-line view rendering](https://github.com/SharePoint/sp-dev-list-formatting/tree/master/view-samples/multi-line-view)
139
142
140
143
141
-
Similarly, to get the below format in ‘Tiles’ layout for the Feedback list, define the formatter within tileProps:
142
-

144
+
Similarly, to get the below format in ‘Tile’ layout for the Feedback list, define the formatter within `tileProps`:
145
+

This example applies `% (Mod)` to a list view row with alternate coloring the rows:
@@ -288,15 +299,15 @@ Optional element. Specifies a CSS class(es) that is applied to the entire row. S
288
299
289
300
Optional element. Specifies whether the ability to select rows in the view is disabled or not. *false* is the default behavior inside a list view (meaning selection is visible and enabled). *true* means that users will not be able to select list items.
290
301
291
-
For list & compact list layout, `hideSelection` only takes effect when there's a `rowFormatter` element specified. If no `rowFormatter` is specified, then `hideSelection` is ignored. For tile layout, `hideSelection` will only take effect if defined inside `tileProps` properties.
302
+
For list & compact list layout, `hideSelection` only takes effect when there's a `rowFormatter` element specified. If no `rowFormatter` is specified, then `hideSelection` is ignored. For 'Tile' layout, `hideSelection` will only take effect if defined inside `tileProps` properties.
292
303
293
304
### hideColumnHeader
294
305
295
306
Optional element. Specifies whether the column headers in the view are hidden or not. *false* is the default behavior inside a list view (meaning column headers will be visible). *true* means that the view will not display column headers.
296
307
297
308
### tileProps
298
309
299
-
Optional element. Specifies a JSON object that describes a tile view format. Elements of this property include:
310
+
Optional element. Specifies a JSON object that describes a 'Tile' view format. Elements of this property include:
300
311
- height – defines the height of the card in pixels.
301
312
- width – defines the width of the card in pixels. Can go from height/2 to 3 x height.
0 commit comments