Duplicated
Last Updated: 17 May 2021 21:40 by Lance
Lance
Created on: 16 May 2021 23:32
Category: UI for Blazor
Type: Bug Report
0
filterrow not displaying filter icon in correct place

Hi, 

I reported this last week but it got declined ??  Perhaps a picture will help

The default grid displays the filter icon OVER the text and this makes the text unreadable.  This is just the material format from your websites themebuilder

The icon should be closer to the column width adjuster - as you can see from the attachment there is more space between the columns than there is text

I would expect it to be  "| Description  Y |"  and not "|  Desc... Y        |" which is what its doing.  (really the space between the filter icon and the column adjusted is just wasted and there seems to be no way to fix it)

I've tried to move the k-i-filter using CSS and while giving it a left margin of 32px is working ok and making it look reasonable, it still has the circle highlighter when you click it in the wrong place and I can't figure out how to move that also.

 

Attached Files:
Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
2 comments
Lance
Posted on: 17 May 2021 21:40

Thanks! your workaround correctly moved the filter button across closer to the right edge of the column, so now I have more space to show more text.

 

ADMIN
Marin Bratanov
Posted on: 17 May 2021 09:46

Hi Lance,

If you are referring to this thread of yours, I am sorry for missing such a report in it, I was under the impression it treats column widths and filter operators collections only.

The filter menu icon can indeed, go a little over the text, and here is the original bug report for that (with a workaround) so you can Follow its status: https://feedback.telerik.com/blazor/1462727-filter-icon-overlapping-the-column-header-text. So, I have to mark this one as a duplicate.

As for the padding of the headers - you can adjust its with CSS on your grid. Here's an example I made for you where two columns are too narrow to fit their header texts - the two rules reduce the padding of the header to allow more room (you can them as required, maybe to also remove the left padding if that's what you want) and to position the filter icon further to the right:

 

<style>
    .smaller-header-paddings.k-grid th {
        padding-right: 16px;
    }

    .smaller-header-paddings .k-grid-header .k-grid-filter {
        right: 0px;
    }
</style>

<TelerikGrid Data=@GridData FilterMode="@GridFilterMode.FilterMenu" Resizable="true"
             Pageable="true" Height="400px" Width="400px" Class="smaller-header-paddings">
    <GridColumns>
        <GridColumn Field=@nameof(Employee.IsOnLeave) Title="On Vacation" Width="100px" />
        <GridColumn Field=@nameof(Employee.HireDate) Title="Hire Date" Width="70px" />
        <GridColumn Field=@nameof(Employee.Name) Width="100px" />
        <GridColumn Field=@nameof(Employee.AgeInYears) Title="Age" Width="100px" />
    </GridColumns>
</TelerikGrid>

@code {
    public List<Employee> GridData { get; set; }

    protected override void OnInitialized()
    {
        GridData = new List<Employee>();
        var rand = new Random();
        for (int i = 0; i < 100; i++)
        {
            GridData.Add(new Employee()
            {
                EmployeeId = i,
                Name = "Employee " + i.ToString(),
                AgeInYears = rand.Next(10, 80),
                HireDate = DateTime.Now.Date.AddDays(rand.Next(-20, 20)),
                IsOnLeave = i % 3 == 0
            });
        }
    }

    public class Employee
    {
        public int? EmployeeId { get; set; }
        public string Name { get; set; }
        public int? AgeInYears { get; set; }
        public DateTime HireDate { get; set; }
        public bool IsOnLeave { get; set; }
    }
}

 

Regards,
Marin Bratanov
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.