In many cases the header text of columns gets truncated to an ellipses if the columns aren't wide enough. It would be nice if there was a global way to display a tooltip for each column header that is made up of the header text. I know that I can do this using the column header template, but that will require that I create a template for every column in all of my grids. I'm looking for a way to have it work globally. This could be with a general header template that has context about the header Title, or just a Boolean flag to display column header tooltips.
Thanks,
Mike
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:
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:
Here is are a few links on the matter:
I use a custom filter row for the Grid where I have added a custom component holding the filter cell content. I am saving the Grid state upon change and restoring it on initialization.
I noticed that the custom filter component is initialized before the Grid state. As a result, there is an applied filter but the input in the custom filter component does not show it.
This behaviour was new since version 6.0.0. With 5.1.1 it doesn't appear.
Consider the following scenario:
In this case, the Grid should focus the last focused cell in step 1. Instead the Grid focuses the first header cell.
I've customized the GridColumnMenu to only show the Column Chooser and assign Locked Columns (disabled all others, including Sortable):
<GridColumnMenuSettings
FilterMode="@ColumnMenuFilterMode.None"
Lockable="true"
ShowColumnChooser="true"
Groupable="false"
Sortable="false"
Reorderable="false">
</GridColumnMenuSettings>
I'm handling the sorting by clicking directly on the column header. In that configuration, the menu icon is highlighted for the actively sorted column:
This is misleading because the user cannot affect the sorting via the column menu. If Sortable = "false", I'd expect no indicator difference in the column headers.
I have a Grid with row selection and column virtualization. After selecting all rows and zooming out my browser to 80% or less, the column virtualization stops working - data is not loaded in the cells on vertical scroll.
The scenario is:
In this case, the Grid should not try to create or clone an edit item on its own. Instead, it should rely on the returned instance from OnModelInit. However, the Grid first fires OnModelInit and then it still tries to clone or create an edit item, which causes an exception.
A possible workaround is to manage the whole edit process manually, similar to the example with ListView popup editing.
Cuando agrego GridAggregates el exportador de excel no me permite dejar limpia la fila de Totales (FooterTemplates) para unicamente dejar el Dato me coloca la siguiente estructura: "aggregate_sum: X" y al remover el aggregate_sum de los archivos de recursos me deja el texto ": X" por lo que la cadena sigue sin quedar limpia.
De igual manera en mi grid view tengo la columna de Totales y no la agrega al archivo que se exporta los totales como se ve en la imagen:
After filtering a nullable DateTime column, the SelectAll checkbox in the GridCheckboxColumn becomes selected, and its functionality stops working correctly.
I have a master-detail draggable Grid scenario in which both Grids have RowDraggable="true". When the user starts dragging a row from the DetailTemplate Grid, a JavaScript error occurs:
TypeError: Argument 1 ('node') to Node.replaceChild must be an instance of Node
I previously raised an issue regarding the grid popup editor not linking the labels with the generated text inputs which was creating an issue with screenreaders. Since upgrading to version 7.1.0, I've seen that this issue has been fixed but in a way that breaks editor templates. Previously, the "for" attribute of the generated label was being set to the label text, but now everything is being set to a generated GUID.
This is fine for the generated fields since they can link the labels to the controls automatically (by setting the ID of the control to the GUID), but for templates, this means that we cannot link the generated label to the control since we cannot get access to the GUID in the template (as far as I know). Previously, when the "for" attribute on templates was the same as the label text, I could set the ID of the custom template control to the label text and the controls will be linked correctly.
===
ADMIN EDIT
===
For the time being, possible workarounds are:My Grid uses a lot of data (more than 200 000 records). I noticed that only in Firefox the export fails if the file is large - approximately 60MB.
The export of such large files works well in Chrome and Edge.
<ColumnMenu>
<ColumnMenuFiltering/>
<ColumnMenuSorting/>
....
</ColumnMenu>
Using the grid with OnRead event to fill data. I need to set the sortings at runtime, so I use also the OnStateInit event.
It all works fine because OnStateInit fires before OnRead and I set the sorting inside OnStateInit.
If I put an empty GridAggregates then OnStateInit fires after OnRead thus inside OnRead I don't have the sortings set.
===
ADMIN EDIT
===
As a workaround for the time being, do not include empty GridAggregates tag, only add them when you actually want to include some aggregate functions.
I am using a CheckBoxList filter menu and I am setting an initial filter through the OnStateInit. I noticed that when the Grid initializes and I check all the boxes, the Grid does not show any records. For reference, if no initial filter is applied and all CheckBoxes are selected, the Grid shows all the records.
Reproduction: https://blazorrepl.telerik.com/GSbbbJut14K03I2x14.
===
ADMIN EDIT
===
As a workaround for the time being, you may create a custom Filter Menu.
There seems to be no System.Type that will allow a GridColumn to be specified with the 'FieldType' attribute to receive a TelerikTimePicker
typeof(DateTime) --> TelerikDateTimePicker
typeof(?) --> TelerikTimePicker
<TelerikGrid Data="@gridDataExpando" Width="100%" Sortable="false" Pageable="false" Resizable="true" ShowColumnMenu="false"
ScrollMode="@GridScrollMode.Scrollable"
Height="100%"
EditMode="@GridEditMode.Incell"
OnUpdate="@UpdateHandlerExpando"
OnEdit="@EditHandler">
<GridColumns>
@{
var firstItem = gridDataExpando.FirstOrDefault();
if (firstItem != null)
{
var dictionaryItem = firstItem as IDictionary<string, object>;
foreach (var item in dictionaryItem)
{
if (!item.Key.Contains("Id"))
{
<GridColumn Field="@(item.Key)" FieldType="@(this.GetDataType(item.Key))" Width="140px" DisplayFormat="{0:hh:mm:ss tt}">
<HeaderTemplate>
<span>@item.Key</span>
</HeaderTemplate>
</GridColumn>
}
}
}
}
</GridColumns>
</TelerikGrid>