Skip to content

Commit

Permalink
Add tree grid row pinning topic
Browse files Browse the repository at this point in the history
  • Loading branch information
georgianastasov committed Apr 19, 2024
1 parent a579dbf commit 0971850
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions doc/en/components/grids/_shared/row-pinning.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ grid.pinning = { rows: RowPinningPosition.Bottom };
}
```

<!-- ComponentStart: Grid, HierarchicalGrid -->
<!-- ComponentStart: Grid, TreeGrid, HierarchicalGrid -->
```tsx
<{ComponentSelector} id="dataGrid" autoGenerate="true">
</{ComponentSelector}>
<{ComponentSelector} id="dataGrid" autoGenerate="true">
</{ComponentSelector}>

var hierarchicalGrid = document.getElementById("dataGrid") as IgrGrid;
hierarchicalGrid.pinning = { rows: RowPinningPosition.Bottom };
var grid = document.getElementById("dataGrid") as {ComponentSelector};
grid.pinning = { rows: RowPinningPosition.Bottom };
```
<!-- ComponentEnd: Grid, HierarchicalGrid -->
<!-- ComponentEnd: Grid, TreeGrid, HierarchicalGrid -->

## Custom Row Pinning UI

Expand Down Expand Up @@ -325,7 +325,7 @@ public pinCellTemplate = (ctx: IgcCellTemplateContext) => {
<!-- React -->
```tsx
function cellPinCellTemplate(ctx: IgrCellTemplateContext) {
const index = ctx.dataContext.cell.id.rowIndex;
const index = ctx.dataContext.cell.row.index;
return (
<>
<span onPointerDown={(e: any) => toggleRowPin(index)}>📌</span>
Expand Down
2 changes: 1 addition & 1 deletion docfx/en/components/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
"status": ""
},
{
"exclude": ["Angular", "React"],
"exclude": ["Angular"],
"name": "Row Pinning",
"href": "grids/tree-grid/row-pinning.md",
"status": ""
Expand Down

0 comments on commit 0971850

Please sign in to comment.