|
| 1 | +--- |
| 2 | +title: Add Fixed Footer to Scrollable DockManager Content Pane |
| 3 | +description: Learn how to add a fixed footer at the bottom of a scrollable DockManagerContentPane in a Telerik DockManager for Blazor. |
| 4 | +type: how-to |
| 5 | +page_title: How to Add Fixed Footer to Scrollable DockManager Content Pane |
| 6 | +meta_title: How to Add Fixed Footer to Scrollable DockManager Content Pane |
| 7 | +slug: dockmanager-kb-add-content-pane-footer |
| 8 | +tags: blazor, dockmanager, footer |
| 9 | +res_type: kb |
| 10 | +ticketid: 1700189 |
| 11 | +--- |
| 12 | + |
| 13 | +## Environment |
| 14 | +<table> |
| 15 | + <tbody> |
| 16 | + <tr> |
| 17 | + <td>Product</td> |
| 18 | + <td>DockManager for Blazor</td> |
| 19 | + </tr> |
| 20 | + </tbody> |
| 21 | +</table> |
| 22 | + |
| 23 | +## Description |
| 24 | + |
| 25 | +I want to add a footer below the content block in the [`DockManagerContentPane`](slug:dockmanager-pane-types) component. The footer should remain fixed while the content block is scrollable. |
| 26 | + |
| 27 | +## Solution |
| 28 | + |
| 29 | +To add a fixed footer below a scrollable content in a `DockManagerContentPane`, define a `div` container with `display: flex; flex-direction: column;` and set the scrollable content and footer as separate sections. |
| 30 | + |
| 31 | +````Razor |
| 32 | +<TelerikDockManager Height="90vh"> |
| 33 | + <DockManagerPanes> |
| 34 | + <DockManagerSplitPane Orientation="@DockManagerPaneOrientation.Vertical"> |
| 35 | + <Panes> |
| 36 | + <DockManagerContentPane Size="50%" HeaderText="Pane 1.1" Class="scrollable-pane"> |
| 37 | + <Content> |
| 38 | + <div class="pane-content-outer"> |
| 39 | + <div class="pane-content-inner"> |
| 40 | + @for (int i = 1; i <= 30; i++) |
| 41 | + { |
| 42 | + <div>Scrollable content line @i</div> |
| 43 | + } |
| 44 | + </div> |
| 45 | + <div class="pane-footer"> |
| 46 | + Fixed Pane Footer |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </Content> |
| 50 | + </DockManagerContentPane> |
| 51 | + <DockManagerContentPane HeaderText="Pane 1.2"> |
| 52 | + <Content> |
| 53 | + Second Content Pane in Split configuration |
| 54 | + </Content> |
| 55 | + </DockManagerContentPane> |
| 56 | + </Panes> |
| 57 | + </DockManagerSplitPane> |
| 58 | + </DockManagerPanes> |
| 59 | +</TelerikDockManager> |
| 60 | +
|
| 61 | +<style> |
| 62 | + .scrollable-pane .k-pane-content { |
| 63 | + padding: 0; |
| 64 | + } |
| 65 | + .scrollable-pane .pane-content-outer { |
| 66 | + display: flex; |
| 67 | + flex-direction: column; |
| 68 | + height: 100%; |
| 69 | + } |
| 70 | + .scrollable-pane .pane-content-inner { |
| 71 | + padding: var(--kendo-spacing-4); |
| 72 | + flex: 1; |
| 73 | + overflow-y: auto; |
| 74 | + } |
| 75 | + .pane-footer { |
| 76 | + background: var(--kendo-color-surface); |
| 77 | + padding: var(--kendo-spacing-2) var(--kendo-spacing-4); |
| 78 | + border-top: 1px solid var(--kendo-color-border); |
| 79 | + font-weight: bold; |
| 80 | + } |
| 81 | +</style> |
| 82 | +```` |
| 83 | + |
| 84 | +## See Also |
| 85 | +- [DockManager Documentation](slug:dockmanager-overview) |
0 commit comments