From 9e40dfd5eead6c5bce5ee9d31618cc019b28f2b1 Mon Sep 17 00:00:00 2001 From: Dimo Dimov <961014+dimodi@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:40:30 +0300 Subject: [PATCH] kb(Grid): Polish Hierarchy column KB --- ...ize-hierarchy-expand-column-blazor-grid.md | 74 +++++++++++-------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/knowledge-base/grid-customize-hierarchy-expand-column-blazor-grid.md b/knowledge-base/grid-customize-hierarchy-expand-column-blazor-grid.md index d3b2bcdcfe..1c0b93c8df 100644 --- a/knowledge-base/grid-customize-hierarchy-expand-column-blazor-grid.md +++ b/knowledge-base/grid-customize-hierarchy-expand-column-blazor-grid.md @@ -1,12 +1,12 @@ --- -title: How to Reorder, Lock or Resize the Hierarchy Expand/Collapse Column in Telerik Blazor Grid -description: Learn how to customize the hierarchy expand/collapse column in Telerik Blazor Grid, including changing its position, locking it, and setting its width and title. +title: Hide, Reorder, Lock or Resize the Grid Hierarchy Expand/Collapse Column +description: Learn how to hide, reorder, lock (freeze), resize, or customize (set a title) the hierarchy expand/collapse column of the Telerik Blazor Grid. type: how-to -page_title: How to Reorder, Lock or Resize the Hierarchy Expand/Collapse Column in Telerik Blazor Grid +page_title: How to Hide, Reorder, Lock or Resize the Grid Hierarchy Expand/Collapse Column slug: grid-kb-customize-hierarchy-expand-column-blazor-grid tags: blazor, grid, hierarchy, expand, collapse, column res_type: kb -ticketid: 1658470,1642380,1638466,1635003,1630238 +ticketid: 1658470, 1642380, 1638466, 1635003, 1630238, 1684240 --- ## Environment @@ -28,10 +28,12 @@ This KB article answers the following questions: * Is it possible to lock/freeze the expand column for a hierarchical grid? * Can I add a title to the hierarchy expand/collapse column? * How can I change the width of the expand column in a hierarchical Grid? +* How to hide the Grid hierarchy expand/collapse column? +* How to expand the Grid detail template with a link in the data row, instead of using the plus icon sign? ## Solution -By default, the hierarchy expand/collapse column in the Telerik UI for Blazor [Grid](slug:grid-overview) is not declared in the markup like the other data-bound columns. It renders automatically when a `DetailTemplate` is added to the Grid. At the time of writing (UI for Blazor **6.0.2**), this built-in hierarchy expand/collapse column does not support being locked or other common configurations like managing its position, setting its width, or adding a title. +By default, the hierarchy expand/collapse column in the Telerik UI for Blazor [Grid](slug:grid-overview) is not declared in the markup like the other data-bound columns. It renders automatically when a `DetailTemplate` is added to the Grid. At the time of writing (UI for Blazor **8.1.1**), this built-in hierarchy expand/collapse column does not support being locked or other common configurations like managing its position, setting its width, or adding a title. >tip Vote for and follow the [feature request for the Grid to support controlling the position of the expand column](https://feedback.telerik.com/blazor/1647135-ability-to-control-the-position-of-the-expand-column-in-a-hierarchical-grid). @@ -59,19 +61,28 @@ To customize the hierarchy expand/collapse column, follow these steps: @{ - var employee = context as MainModel; + var employee = (MainModel)context; - + } - + + + @@ -79,18 +90,20 @@ To customize the hierarchy expand/collapse column, follow these steps: @{ var dataItem = (MainModel)context; } - +