Completed
Last Updated: 01 Apr 2024 13:11 by ADMIN
Release 2024 Q2 (May)
Harmen
Created on: 26 Feb 2024 15:24
Category: Grid
Type: Bug Report
1
The Drop Clue is missing when you reorder Grid columns within a Window

I have a TelerikGrid with Reordarable enabled inside of a TelerikWindow. Reordering of the column works fine only the drop clue is not showing. I think this is because the z-index is incorrect.

Missing drop clue:

 

z-index of drop clue is 10000:

 

z-index of window is 10002:

1 comment
ADMIN
Hristian Stefanov
Posted on: 04 Mar 2024 09:28

Hi Harmen,

I have reviewed the described behavior and can confirm that it is indeed a bug in configuration with a Grid component within a Window.

As a temporary workaround, you can use the following CSS style that increases the drop clue z-index:

<style>
    .k-grouping-dropclue {
        z-index: 10002 !important;
    }
</style>

<TelerikWindow Modal="true"
               @bind-Visible="@isModalVisible"
               CloseOnOverlayClick="true">
    <WindowTitle>
        Window Title
    </WindowTitle>
    <WindowContent>
        <TelerikGrid Data="@GridData"
                     Pageable="true"
                     Sortable="true"
                     Reorderable="true"
                     Height="400px">
            <GridColumns>
                <GridColumn Field="Name" Title="Product Name" />
                <GridColumn Field="Price" DisplayFormat="{0:C2}" />
                <GridColumn Field="@nameof(Product.Released)" DisplayFormat="{0:D}" />
                <GridColumn Field="@nameof(Product.Discontinued)" />
            </GridColumns>
        </TelerikGrid>
    </WindowContent>
    <WindowActions>
        <WindowAction Name="Close" />
    </WindowActions>
</TelerikWindow>

<TelerikButton OnClick="@( _ => isModalVisible = true )">Open the window</TelerikButton>

@code {
    private bool isModalVisible { get; set; } = true;
    private List<Product> GridData { get; set; }

    protected override void OnInitialized()
    {
        GridData = new List<Product>();

        var rnd = new Random();

        for (int i = 1; i <= 30; i++)
        {
            GridData.Add(new Product
                {
                    Id = i,
                    Name = "Product name " + i,
                    Price = (decimal)(rnd.Next(1, 50) * 3.14),
                    Released = DateTime.Now.AddDays(-rnd.Next(1, 365)).AddYears(-rnd.Next(1, 10)).Date,
                    Discontinued = i % 5 == 0
                });

        }

        base.OnInitialized();
    }

    public class Product
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public decimal Price { get; set; }
        public DateTime Released { get; set; }
        public bool Discontinued { get; set; }
    }
}

Additionally, as a token of appreciation, I have credited your account with Telerik points for reporting it.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!