Declined
Last Updated: 26 Sep 2024 14:10 by ADMIN
Abhi
Created on: 06 Sep 2024 16:38
Category: Grid
Type: Bug Report
5
The last column in the column chooser is not disabled when the grid contains GridCheckboxColumn.

Problem Statement:
We have the following blazor grid:

We have enabled the GridColumnMenuSettings

Now when we open the column chooser it does not disable for the last option.



When we don't have the GridCheckboxColumn then it works as intended



The last column option is disabled


Expected Result : We don't want the check box column to be shown in the column chooser and the last option to be unchecked in the column chooser needs to be disabled.

Code snippet is as follows:
@* Use the Template to render the list of columns and add some custom styles *@ 

<TelerikGrid Data="@MyData"
             Pageable="true"
             PageSize="5"
             Width="700px"
             FilterMode="@GridFilterMode.FilterMenu"
             Sortable="true"
             ShowColumnMenu="true">
     <GridSettings>
     
     <GridColumnMenuSettings Sortable="true"
                             Lockable="false"
                             FilterMode="@ColumnMenuFilterMode.None" />
 </GridSettings>
    <GridColumns> 

 <GridCheckboxColumn Width="80px" HeaderClass="header-select-all" />   
        <GridColumn Field="@(nameof(SampleData.Id))" Width="80px" Title="Id" Id="id-column-id" />
        <GridColumn Field="@(nameof(SampleData.FirstName))" Title="First Name" Id="firstname-column-id" />
        <GridColumn Field="@(nameof(SampleData.LastName))" Title="Last Name" Id="lastname-column-id" />
        <GridColumn Field="@(nameof(SampleData.CompanyName))" Title="Company" Id="companyname-column-id" />
        <GridColumn Field="@(nameof(SampleData.Team))" Title="Team" Id="team-column-id" />
        <GridColumn Field="@(nameof(SampleData.HireDate))" Title="Hire Date" Id="hiredate-column-id" />
    </GridColumns>
</TelerikGrid>

@code {
    public string TextboxValue { get; set; } = string.Empty;

    public IEnumerable<SampleData> MyData = Enumerable.Range(1, 30).Select(x => new SampleData
    {
        Id = x,
        FirstName = $"FirstName {x}",
        LastName = $"LastName {x}",
        CompanyName = $"Company {x}",
        Team = "team " + x % 5,
        HireDate = DateTime.Now.AddDays(-x).Date
    });

    public class SampleData
    {
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string CompanyName { get; set; }
        public string Team { get; set; }
        public DateTime HireDate { get; set; }
    }
}

2 comments
ADMIN
Nansi
Posted on: 26 Sep 2024 14:08

Hello everyone,

After further discussion, we have decided to close this report for the following reasons:

As mentioned earlier, the goal is to ensure that the Grid always retains at least one visible column. While we do have a built-in prevention mechanism in place to enforce this, the Grid should not rely on this as a primary method. Instead, the proper solution is to use the VisibleInColumnChooser parameter of the column to specify which columns should remain visible in the Grid column chooser. This approach allows more control and aligns with individual application requirements for managing column visibility.

In general, it is a matter of a Grid configuration. One application may rely exactly on the use case where:

  • The Checkbox column is not visible in the column chooser.
  • The user can select all columns in the column chooser and only the Checkbox column to remain visible.

Additionally, the Checkbox column can also appear in the Grid column chooser when the Checkbox column Title parameter is set. Once the Checkbox column appears in the column chooser the built-in prevention of selection of the last column in the column chooser works.

Regards,
Nansi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Nansi
Posted on: 13 Sep 2024 10:04

Hi Abhi,

Thank you for the screenshots and the runnable code example.

I was able to reproduce the behavior. In both scenarios, the goal is to ensure that the Grid always retains at least one visible column, which is successfully achieved. However, we acknowledge that the behavior is inconsistent from both a UI and UX perspective, thus, I have changed the status of the public item to "Unplanned".

You are automatically subscribed as a creator, which means you will receive email notifications regarding the status updates of this item.

Thank you for reporting this.

Regards,
Nansi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.