Unplanned
Last Updated: 18 Nov 2024 10:25 by Pierluigi

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.

Declined
Last Updated: 15 Nov 2024 12:36 by ADMIN

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.

Declined
Last Updated: 21 Nov 2024 07:03 by ADMIN

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>


Unplanned
Last Updated: 31 Oct 2024 09:32 by Steven

Currently, when there is a blank or null value, no text is rendered next to the CheckBox in the CheckBoxList filter. I want to be able to customize that and easily set my desired text. For example, "(Blanks)" as in Excel.

Declined
Last Updated: 31 Oct 2024 07:06 by ADMIN
Created by: Elliot
Comments: 5
Category: Grid
Type: Feature Request
0

Hi,

I have spent a while looking for the feature to move the Footer Template to the first line of the Telerik grid. Is this currently possible with a parameter I'm unaware of? How possible would this be to do if not. 

Kind Regards,

Elliot

Unplanned
Last Updated: 14 Nov 2024 22:07 by Steve

The issue targets a Grid with cell selection and DragToSelect feature disabled where at least one column has Visible="false". With this configuration, when using Shift + Click to select multiple cells, the result is a mismatch in the cells that should be selected, after the position where the invisible column is placed.

Video reproduction attached. Reproduction code: https://blazorrepl.telerik.com/GyFuQwPf37H8riAM19.

Unplanned
Last Updated: 16 Oct 2024 12:38 by ADMIN

Please add the ability to expand or collapse all rows as a default feature of the Grid.

I've seen the Expand Rows From Code example, but I'd like this to be part of the grid itself, not a button outside of the grid.

I'm trying to add a button in the unused top left cell of the grid, but I've not found a way to use that cell.

 

Unplanned
Last Updated: 07 Oct 2024 12:41 by Michael

The behavior is reproducible in server-side apps when using the Inline or Incell mode and editing numerical values.

When inputting into the field the first value input is either ignored or removed. The default is 0, when backspacing to clear it and then inputting a number, sometimes the number is shown and then immediately removed, and sometimes it's not shown at all and will only displayed when typed a second time.

===

ADMIN EDIT

===

Possible workarounds for the time being:

Unplanned
Last Updated: 03 Oct 2024 08:31 by Roberto
Created by: Roberto
Comments: 3
Category: Grid
Type: Feature Request
4

Please expose the current data of the Grid and TreeList when using Data or OnRead. This will spare the need to cache data for the second time in-memory, or repeat all data operations. The benefit is that the app can:

  • Know what data items the user is seeing.
  • Obtain the data it its current shape / state.

 

Unplanned
Last Updated: 26 Sep 2024 13:12 by ADMIN

My scenario is a lot similar to this one and I call SetStateAsync to exit the edit mode. In addition, my Grid is grouped on initialization. I noticed that each time I call SetStateAsync, the AggregateFunctions count of the GroupDescriptor increases and one more identical AggregateFunction is added to the same GroupDescriptor. This results in slowing the editing process.

Here is a simpler reproduction: https://blazorrepl.telerik.com/wekZmTPE35YpD8f504.

Completed
Last Updated: 03 Oct 2024 07:34 by ADMIN

I have recently encountered an accessibility issue with the grid popup editor where the labels for the generated fields are not linked to their respective editor. It seems that the label does have a "for" attribute that is the same as the column title which I expect, but the Id of the input does not get set to the same thing. I can't see any option to make the association happen automatically.

===

ADMIN EDIT

===

A possible option for the time being is to use a custom popup edit form. You may either declare your desired custom content for the form and link the labels to their respective inputs or use the Form component with the field autogeneration feature which will automatically link the labels to the inputs.

Declined
Last Updated: 26 Sep 2024 14:10 by ADMIN

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; }
    }
}

Unplanned
Last Updated: 04 Sep 2024 10:18 by Mehdi

I want to filter a Grid by DateTimeOffset? field

 

===ADMIN EDIT===

There are two possible options:

1. Use a DTO in which you have a DateTime field converted as desired by your app from the DateTimeOffset. Filtering, sorting, editing, and grouping on DateTime values are supported out-of-the-box.

REPL example that demonstrates this approach. 

2. Use the Grid Filter Template. As a filter editor, you can use the DateTimePicker component, which supports the DateTimeOffset type. 

REPL example that demonstrates this approach. 

 

 

Completed
Last Updated: 14 Nov 2024 09:25 by ADMIN
Release 7.0.0

I am using InCell Grid editing. I want to prevent an edit cell from closing on certain condition. However, when I cancel the update with args.IsCancelled = true in OnUpdate, the user can still close the edited cell with Enter or Tab. This is inconsistent with inline or popup editing.

===

A possible workaround is to cancel both OnUpdate and the subsequent OnEdit.

https://blazorrepl.telerik.com/QykMHkks10APuDLQ47

@using System.ComponentModel.DataAnnotations

<TelerikGrid Data="@GridData"
             EditMode="@GridEditMode.Incell"
             OnEdit="@OnGridEdit"
             OnUpdate="@OnGridUpdate">
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.Min)" />
        <GridColumn Field="@nameof(SampleModel.Max)" />
    </GridColumns>
</TelerikGrid>

<TelerikNotification @ref="@NotificationRef"
                     HorizontalPosition="@NotificationHorizontalPosition.Center"
                     VerticalPosition="@NotificationVerticalPosition.Top" />

@code {
    private TelerikNotification? NotificationRef { get; set; }

    private List<SampleModel> GridData { get; set; } = new();

    private bool ShouldCancelOnEdit { get; set; }

    private int LastId { get; set; }

    private void OnGridEdit(GridCommandEventArgs args)
    {
        if (ShouldCancelOnEdit)
        {
            ShouldCancelOnEdit = false;
            args.IsCancelled = true;
        }
    }

    private void OnGridUpdate(GridCommandEventArgs args)
    {
        var updatedItem = (SampleModel)args.Item;

        if (updatedItem.Min > updatedItem.Max)
        {
            NotificationRef?.Show(new NotificationModel()
            {
                ThemeColor = ThemeConstants.Notification.ThemeColor.Error,
                Text = "Min must be smaller than Max"
            });

            args.IsCancelled = true;
            ShouldCancelOnEdit = true;
        }
        else
        {
            var originalItemIndex = GridData.FindIndex(i => i.Id == updatedItem.Id);

            if (originalItemIndex != -1)
            {
                GridData[originalItemIndex] = updatedItem;
            }

            ShouldCancelOnEdit = false;
        }
    }

    protected override void OnInitialized()
    {
        for (int i = 1; i <= 5; i++)
        {
            GridData.Add(new SampleModel()
            {
                Id = ++LastId,
                Name = $"SampleModel {LastId}",
                Min = Random.Shared.Next(1, 10),
                Max = Random.Shared.Next(11, 20)
            });
        }
    }

    public class SampleModel
    {
        public int Id { get; set; }
        [Required]
        public string Name { get; set; } = string.Empty;
        public int Min { get; set; }
        public int Max { get; set; }
    }
}

Unplanned
Last Updated: 29 Aug 2024 08:23 by ADMIN
The current Blazor Grid does not support selection of multiple ranges of items in a grid. When executing the following steps  (example is from https://docs.telerik.com/blazor-ui/components/grid/selection/rows) I would expect the row of 'Employee 9' to be selected too, but this is not the case. Therefor a request to make it possible to use the combination Ctrl + Shift in combination with the grid selection to select multiple ranges of items. This would be the same behavior as in Windows Explorer for example.
Completed
Last Updated: 15 Nov 2024 13:24 by ADMIN
Release 2024 Q4 (Nov)

I am using Grid with Cell Selection enabled and DragToSelect="true". If I define a Template inside the GridColumn tag and I add a div inside that, SelectedCellsChanged event handler does not trigger if I start dragging by clicking on the div or if I drop inside that one.

Reproduction: https://blazorrepl.telerik.com/myasmnvQ46Jt7k5n50.

===

ADMIN EDIT

===

The only workaround for the time being is to disable the drag selection and let the user only select cells by clicking them. The cells will be selected even if the user clicks on the custom <div> element inside the template.

Declined
Last Updated: 07 Oct 2024 09:32 by ADMIN

Currently the GridSearchBox is able to search in all of the visible columns but when it comes to searching in multiple columns split by space it does not work. Or even two different strings in the same cell.

Example:

If from the above grid, I type in the search box, "LT" three products will be returned but if I type "LT LD" it should return two products but the results set comes with nothing.

I have implemented CustomSearchBox component as a solution in the interim to achieve this functionality. But it would be a worthwhile effort to have this functionality out of the box.

Thank you.

 

Sheraz

Completed
Last Updated: 13 Aug 2024 10:34 by ADMIN
Release 2024 Q3 (Aug)
Created by: Marco
Comments: 0
Category: Grid
Type: Bug Report
1

Initial groups are duplicated in version 6.1.0. The OnStateInit event fires twice and the group descriptors are added twice. The problem occurs only when using <GridAggregates>.

The workaround is to clear the GroupDescriptors collection on OnStateInit.

@using Telerik.DataSource

<h2>No Aggregates</h2>

<p><code>OnStateInitCounter1:</code> @OnStateInitCounter1</p>
<TelerikGrid Data="@GridData"
             TItem="@SampleModel"
             Groupable="true"
             OnStateInit="@OnGridStateInit1">
    <GridAggregates>

    </GridAggregates>
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.GroupName)" />
    </GridColumns>
</TelerikGrid>

<h2>With Aggregates</h2>

<p><code>OnStateInitCounter2:</code> @OnStateInitCounter2</p>
<TelerikGrid Data="@GridData"
             TItem="@SampleModel"
             Groupable="true"
             OnStateInit="@OnGridStateInit2">
    <GridAggregates>
        <GridAggregate Field="@nameof(SampleModel.Name)" Aggregate="@GridAggregateType.Count" />
    </GridAggregates>
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.GroupName)" />
    </GridColumns>
</TelerikGrid>

<h2>With Aggregates and Workaround</h2>

<p><code>OnStateInitCounter3:</code> @OnStateInitCounter3</p>
<TelerikGrid Data="@GridData"
             TItem="@SampleModel"
             Groupable="true"
             OnStateInit="@OnGridStateInit3">
    <GridAggregates>
        <GridAggregate Field="@nameof(SampleModel.Name)" Aggregate="@GridAggregateType.Count" />
    </GridAggregates>
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.GroupName)" />
    </GridColumns>
</TelerikGrid>

@code {
    private int OnStateInitCounter1 { get; set; }
    private int OnStateInitCounter2 { get; set; }
    private int OnStateInitCounter3 { get; set; }

    private void OnGridStateInit1(GridStateEventArgs<SampleModel> args)
    {
        ++OnStateInitCounter1;

        args.GridState.GroupDescriptors.Add(new GroupDescriptor
        {
            Member = nameof(SampleModel.GroupName)
        });
    }

    private void OnGridStateInit2(GridStateEventArgs<SampleModel> args)
    {
        ++OnStateInitCounter2;

        args.GridState.GroupDescriptors.Add(new GroupDescriptor
        {
            Member = nameof(SampleModel.GroupName)
        });
    }

    private void OnGridStateInit3(GridStateEventArgs<SampleModel> args)
    {
        ++OnStateInitCounter3;

        args.GridState.GroupDescriptors = new List<GroupDescriptor>();
        // OR
        args.GridState.GroupDescriptors.Clear();

        args.GridState.GroupDescriptors.Add(new GroupDescriptor
        {
            Member = nameof(SampleModel.GroupName)
        });
    }

    private List<SampleModel> GridData { get; set; } = new();

    protected override void OnInitialized()
    {
        for (int i = 1; i <= 4; i++)
        {
            GridData.Add(new SampleModel()
            {
                Id = i,
                Name = $"Name {i}",
                GroupName = $"Group {i % 2 + 1}"
            });
        }
    }

    public class SampleModel
    {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public string GroupName { get; set; } = string.Empty;
    }
}

Completed
Last Updated: 13 Aug 2024 10:34 by ADMIN
Release 2024 Q3 (Aug)
The issue targets a Grid with cell selection and DragToSelect feature enabled where at least one column has Visible="false". With this configuration, the selected cells do not match the area that the user dragged to select.
Completed
Last Updated: 13 Aug 2024 10:32 by ADMIN
Release 2024 Q3 (Aug)
In a Grid with multi-column headers and cell selection, the selected cells do not match the area that the user dragged to select.
1 2 3 4 5 6