question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataGrid HierarchyColumn missing content/arrow in Cell edit mode

See original GitHub issue

Bug type

Component

Component name

HierarchyColumn

What happened?

When adding <HierarchyColumn /> to a datagrid, arrows do not show.

image

Expected behavior

DataGrid should show a Expand/Collapse arrow

I think it can be fixed, by adding an <EditTemplate> to https://github.com/MudBlazor/MudBlazor/blob/dev/src/MudBlazor/Components/DataGrid/HierarchyColumn.razor

Reproduction link

https://try.mudblazor.com/snippet/GEQGlQmPxJAVHasN

Reproduction steps

Add the following to a DataGrid:

<MudDataGrid Items="@Elements" ReadOnly="false" EditMode="@DataGridEditMode.Cell">
    <Columns>
        <HierarchyColumn T="Element" />

Relevant log output

No response

Version (bug)

6.1.5

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
HClausingcommented, Feb 9, 2023

Hello @LccBuild ,

It’s caused by ReadOnly="false".

In my opinion, it can be fixed working here:

image

I would like to contribute on this issue, if @MudBlazor/core-team accepts.

1reaction
LccBuildcommented, Mar 7, 2023

I’m currently using this workaround:

` <Columns>

        <MudBlazor.Column T="MyType" Tag="@("hierarchy-column")" Sortable="false" Resizable="false" ShowColumnOptions="false" HeaderStyle="width:0%" FieldType="@typeof(object)">
            <EditTemplate>
                <MudToggleIconButton Size="Size.Small" ToggledSize="Size.Small" ToggledChanged="@context.Actions.ToggleHierarchyVisibilityForItem"
                                     Icon="@Icons.Material.Filled.KeyboardArrowRight"
                                     ToggledIcon="@Icons.Material.Filled.KeyboardArrowDown" />
            </EditTemplate>
        </MudBlazor.Column>`
Read more comments on GitHub >

github_iconTop Results From Across the Web

DataGrid master detail hierarchy toggle arrows missing
Hi, I'm using DataGrid's hierarchy option as per the example on the demo page, but the rows can't be expanded. The first column...
Read more >
I want to move cells with keyboard arrow keys while editing ...
I have created a datagrid in WPF. But I want to move with keyboard arrow left, right keys, but there is a problem....
Read more >
How can I get navigation (tab/arrow) through cells on a ...
The read-only cells get tabbed to and selected even though they cannot be edited. I'm combing over the properties of the DataGridView looking ......
Read more >
Data Grid
In it's simplest form, the data grid is just a table, displaying data from a data source. In it's most complex form, the...
Read more >
Keyboard Navigation - Blazor DataGrid Demos - Telerik
Enter when the grid is in InCell EditMode - EditMode is activated. In hierarchy cell - expands /collapses the detail row. In grouping...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found