Need More Info
Last Updated: 19 Feb 2025 15:11 by ADMIN
Jon
Created on: 19 Feb 2025 15:10
Category: Grid
Type: Feature Request
1
Auto table layout and single table rendering

Please add support for automatic Grid table layout, which will allow column widths to be set by the browser, based on the cell content.

===

TELERIK EDIT:

This is a huge task with many implications. We require large-enough customer demand before we start exploring or implementing it.

Everyone who is interested, please drop a few lines here and share:

  • What problems are you trying to solve?
  • What benefits you want to achieve?
  • Why the current Grid capabilities and behavior don't work for you?

Here are some thoughts on the matter:

HTML tables have two layout modes: auto and fixed. In auto layout, the table column widths depend on the content. In fixed layout, all column widths are equal or obey the set styles, no matter the content.

The Blazor Grid renders separate tables for its header cells and data cells. This allows the data area to scroll, while the header area remains visible at all times. The only reliable way to ensure column alignment between the two tables is to apply a fixed table-layout style. This results in the behavior, which we have described in the documentation.

The only way to have auto table layout in the Blazor Grid is to render the component as a single <table>, which is currently not available.

Possible workarounds include: 

  • Set optimal fixed widths for all columns, or at least the ones with predictable content.
  • Autofit the columns with non-predictable content, or simply set a bit larger widths to make sure the content doesn't clip or wrap.

Here is are a few links on the matter:

0 comments