Unplanned
Last Updated: 13 Apr 2022 07:16 by ADMIN
Steven
Created on: 30 Mar 2022 20:19
Category: Grid
Type: Feature Request
9
Add HoverTitle attribute - allow hover on GridColumn header (th elements) title

I would like to request a simple update to the Grid component.

When a column width is too small - the column header text is cut-off or is unreadable.

For example:

It would be nice that on mouse hover, the full title would be rendered. Currently to achieve this, I have to implement a custom <HeaderTemplate> for every grid column and add a span myself:

<GridColumn Field="@nameof(SalesOrderLineItem.Quantity)">
    <HeaderTemplate>
        <span title="Order Quantity">Order Quantity</span>
    </HeaderTemplate>
</GridColumn>

 

Can you update the GridColumn component and add a title attribute to the column <th> element so the browser can show the fill title should the user hover over it?

 

3 comments
ADMIN
Hristian Stefanov
Posted on: 13 Apr 2022 07:16

Hi Steven,

Thank you for providing additional information.

I agree with you here. That being said, I'm marking this item status "Unplanned" which means that we consider it a valid feature request. I also tweaked a little the title of the request to make it more readable for the Public Feedback Portal.

In the meantime, here is one knowledge base article that shows how to make the Grid templates reusable:

Dynamic Templates that can be repeated easily

You may find it helpful for the current scenario.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Steven
Posted on: 06 Apr 2022 15:50

What is the scenario where the user will hover the mouse instead of resize to see the full title? What is the purpose to have a column with such width that cuts off the title?

- In my experience, I see a need for this functionality when the data in the column is short, for example, an integer value (5), but the column title is much longer "Quantity". 

Sometimes, even trying to abbreviate to "Qty" is too long (because of margins and padding, you might only see "Q...").

When you have a lot of columns and are trying to maximize screen real estate (and are trying to avoid a horizonal scroll bar), it would be nice to have this option without having to define the header template over and over again (20+ times...)

Perhaps a better implementation that I originally suggested would be to introduce a new optional Parameter Column "HoverTitle" (or something more clever)

<GridColumn Field="@nameof(SalesOrderLineItem.Quantity)" Width="115px" Title="Qty" HoverTitle="Quantity"/>

This way we don't add a title on every column so we don' cause regression, unexpected new behavior, or breaking changes on existing grids.

 

 

ADMIN
Hristian Stefanov
Posted on: 06 Apr 2022 15:27

Hi Steven,

After a discussion about this topic, some questions appeared on our end. Let's cover them below.

What is the scenario where the user will hover the mouse instead of resize to see the full title? What is the purpose to have a column with such width that cuts off the title?

If one column is expected to be so tiny, maybe a good option is to use a shorter text or icon that shows the content.

Currently, the easiest way to avoid the potential UX problem is indeed to define <HeaderTemplate> with a title attribute. 

I appreciate the feedback a lot as it will help us to see the need for such an attribute.

Additionally, if the Grid has a title attribute built-in, the browser default tooltip will appear on every hover no matter the column width. Such behavior might be undesired in most cases.

I look forward to your reply.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.