Duplicated
Last Updated: 31 May 2024 10:20 by ADMIN

Hi,

 documentation missing one extremely "silent" breaking change in grid data binding.

When binding/refreshing(subsequent reload) data to VARIABLE, there is "random" need to call grid.Rebind(); Mostly, when data are loaded outside of the grid, ie by some button, or another component. Used together with selected items and grouping enabled.


<TelerikGrid Data="@GridData" SelectionMode="GridSelectionMode.Single" SelectedItems="..."
						 OnRowClick="@...r"  @ref="GHL" ....>

 

prior v6.0, everything is OK:

protected async Task ReloadGrid(int? xid)
{

GridData= await LoadDatafromservice<TItem>...;

}

After upgrading same code, it silently not displaying data or cras.

new breaking behavior at v6.0  - hotfix, but "ugly one":

protected async Task ReloadGrid(int? xid)
{

GridData= await LoadDatafromservice<TItem>...;

GHL.Rebind(); //required, otherwise grid content(rows) is not update. Later the grid crash when selecting row etc. Old "rows" are still displayed;

}

Its weird to gues, where rebind is needed and where not. Previous versions acting as expected(async - task = no problem).
Make it documented, "what is correct" and when.

Or if it is a bug, please move it out from feature request.

Thanks

Duplicated
Last Updated: 08 May 2024 08:42 by ADMIN
Created by: Pratik
Comments: 0
Category: Grid
Type: Feature Request
2
The current Column Chooser is not user friendly and requires multiple clicks as well as user training. For these reasons, I would like the option to include a built in Column Chooser in one location, the Grid ToolBar. 
Duplicated
Last Updated: 03 May 2024 06:32 by ADMIN

When the user drags a third column to the Grid Group Panel, it ends up being second, instead of last. It looks like each new column is inserted at index 1, instead of appended last (when this is the user's intent).

@using Telerik.DataSource

<p>Group by a third column, so that it should come last in the Group Panel:</p>

<TelerikGrid @ref="@GridRef"
             Data="@GridData"
             Pageable="true"
             Sortable="true"
             Groupable="true"
             FilterMode="GridFilterMode.FilterRow"
             OnStateInit="@( (GridStateEventArgs<Employee> args) => OnGridStateInit(args) )"
             OnStateChanged="@( (GridStateEventArgs<Employee> args) => OnGridStateChanged(args) )">
    <GridColumns>
        <GridColumn Field="@nameof(Employee.Name)" />
        <GridColumn Field="@nameof(Employee.Team)" />
        <GridColumn Field="@nameof(Employee.Salary)" />
        <GridColumn Field="@nameof(Employee.OnVacation)" />
    </GridColumns>
</TelerikGrid>

@code {
    private TelerikGrid<Employee>? GridRef { get; set; }

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

    private void OnGridStateInit(GridStateEventArgs<Employee> args)
    {
        args.GridState.GroupDescriptors = new List<GroupDescriptor>();

        args.GridState.GroupDescriptors.Add(new GroupDescriptor()
        {
            Member = nameof(Employee.Team),
            MemberType = typeof(string)
        });

        args.GridState.GroupDescriptors.Add(new GroupDescriptor()
        {
            Member = nameof(Employee.OnVacation),
            MemberType = typeof(bool)
        });
    }

    private async Task OnGridStateChanged(GridStateEventArgs<Employee> args)
    {
        if (args.PropertyName == "GroupDescriptors" && args.GridState.GroupDescriptors.Count > 2 && GridRef != null)
        {
            var secondGroupDescriptor = args.GridState.GroupDescriptors.ElementAt(1);

            args.GridState.GroupDescriptors.Remove(secondGroupDescriptor);
            args.GridState.GroupDescriptors.Add(secondGroupDescriptor);

            await GridRef.SetStateAsync(args.GridState);
        }
    }

    protected override void OnInitialized()
    {
        var rnd = new Random();

        for (int i = 1; i <= 20; i++)
        {
            GridData.Add(new Employee()
            {
                Id = i,
                Name = "Name " + i,
                Team = "Team " + (i % 4 + 1),
                Salary = (decimal)rnd.Next(1000, 3000),
                OnVacation = i % 3 == 0
            });
        }
    }

    public class Employee
    {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public string Team { get; set; } = string.Empty;
        public decimal Salary { get; set; }
        public bool OnVacation { get; set; }
    }
}

Duplicated
Last Updated: 06 Nov 2023 13:46 by ADMIN
Created by: Michal
Comments: 1
Category: Grid
Type: Bug Report
0

Hello,

 when using grid with multiple-selection mode and row template, ONLY single row selection works. Not able to select multiple rows. Grid somehow internally "reverts"(lose) selection to single row.

Here is full detail, with video and sample "what acts weird". Start with the post " Michal - Posted on: 19 Oct 2023 08:38":

https://feedback.telerik.com/blazor/1463819-grid-row-template-with-selection-unsure-how-to-bind-to-selected-item

 

Simplified reproducible sample from Nadezhda Tacheva(thanks), has that issue also - try to select multiple rows:

REPL sample

Video with the problem AND expected result(video is based on sample posted at same feedback above "Posted on: 19 Oct 2023 08:38":

https://feedback.telerik.com/attachment/download/1120622

 

Fully working example(recorded video) in VS - GridCheckBoxColumn in sample "IS HACK!", not required at all(just hint, which can be removed):

@using System.Collections.Generic;
@using System.Dynamic;
    <span>Selection bind not working as expected:</span>
    <TelerikGrid TItem="ExpandoObject"
    @bind-SelectedItems="@gSelectedItems"
                 OnRowClick="@OnGridRowClicked"
                 SelectionMode="GridSelectionMode.Multiple"
                 OnRead=@gHLReadItems
                 RowHeight="60">
        <RowTemplate Context="ctx">
            <td>
                @{
                    var it = (ctx as IDictionary<string, object>);
                    @(it["Name"].ToString())
                }
            </td>
        </RowTemplate>
        <GridColumns>
            <GridCheckboxColumn CheckBoxOnlySelection="true" Visible="false" @key="@("sIDX1")" SelectAll="false" />
            <GridColumn Field="Name" FieldType=@typeof(string) Title="Name" />
        </GridColumns>
    </TelerikGrid>
<span>WORKs OK:</span>
    <TelerikGrid TItem="ExpandoObject"
    @bind-SelectedItems="@gSelectedItems"
                 OnRowClick="@OnGridRowClicked"
                 SelectionMode="GridSelectionMode.Multiple"
                 OnRead=@gHLReadItems
                 RowHeight="60">
        <GridColumns>
            <GridCheckboxColumn CheckBoxOnlySelection="true" Visible="false" @key="@("sIDX2")" SelectAll="false" />
            <GridColumn Field="Name" FieldType=@typeof(string) Title="Name" />
        </GridColumns>
    </TelerikGrid>
        
@code
{
    private List<ExpandoObject> RowData;
    IEnumerable<ExpandoObject> gSelectedItems { get; set; } = Enumerable.Empty<ExpandoObject>();
    protected override void OnInitialized()
    {
        
        RowData = new List<ExpandoObject>();
        dynamic obj0 = new ExpandoObject();
        obj0.Name = "Tester";
        RowData.Add(obj0);
        dynamic obj1 = new ExpandoObject();
        obj1.Name = "Testovicz";
        RowData.Add(obj1);
        dynamic obj2 = new ExpandoObject();
        obj2.Name = "Selectant";
        RowData.Add(obj2);
    }
    protected async Task gHLReadItems(GridReadEventArgs args)
    {
        //RowData are readen from DYNAMIC source, cannot add any NEW property to it
        args.Data = RowData;
        args.Total = 3;
    }
    protected void OnGridRowClicked(GridRowClickEventArgs args)
    {
        var it = args.Item as ExpandoObject;
        if (gSelectedItems.Any(x => x == it))
        {
            gSelectedItems = gSelectedItems.Where(x => x != it);
        }
        else
        {
            gSelectedItems = gSelectedItems.Union(RowData.Where(x => x == it));
        }
    }
}

thanks

Duplicated
Last Updated: 15 Sep 2023 10:52 by ADMIN
Created by: Adrian
Comments: 2
Category: Grid
Type: Bug Report
0
 

**Description**:
I've encountered an issue with the Telerik Grid component in Blazor where caching the grid state, specifically the filtering state, leads to a casting exception upon reloading the page.

**Steps to Reproduce**:
1. Set up a Telerik Grid with a nullable enum column (e.g., `LeadStatuses? Status`).
2. Apply a filter to the `Status` column.
3. Save the grid state (including the filter state) to cache.
4. Refresh the browser.
5. Load the grid state from cache and apply it to the grid.

**Expected Behavior**:
The grid should load with the previously applied filter without any issues.

**Actual Behavior**:
A casting exception occurs, specifically: "Specified cast is not valid."

**Additional Information**:
- The issue seems to be related to filtering and saving state to the grid. When the column is removed, the error doesn't occur.
- Clearing the filter from the cached state for gid will work.
- The exact error message is: 
```
Unhandled exception rendering component: Specified cast is not valid.
 
Duplicated
Last Updated: 30 Jun 2023 09:36 by ADMIN
Created by: Brent
Comments: 1
Category: Grid
Type: Feature Request
1

I'm trying to use the FilterMenu with the CheckBoxListFilter, and it seems like it's sooo close to what I want, if it only had an option for FieldText and FeildValue or something like that. Any way I can get this working to use the ID field as the value and the Name as the text? The highlighted section below is what I would envision it working perfectly as.

<GridColumn Field="@nameof(WorkActivity.WorkGroupId)" Title="Work Group" Width="135px">
            <FilterMenuTemplate Context="context">
                <TelerikCheckBoxListFilter Data="@WorkGroups"
                                           Field="@(nameof(WorkGroup.Name))" FieldValue="@(nameof(WorkGroup.Id))" 
                                           @bind-FilterDescriptor="@context.FilterDescriptor">
                </TelerikCheckBoxListFilter>
            </FilterMenuTemplate>
Duplicated
Last Updated: 07 Feb 2024 11:23 by ADMIN
I would like to use customization options for the exported file when calling the export programmatically. 
Duplicated
Last Updated: 13 Sep 2022 08:13 by ADMIN

Description

When the state is loaded and there is a value in the search box, the X (clear button) is missing. 

Reproduction (if bug)

  1. Create a Grid, set a SearchBox in the toolbar.
  2. Set value in the SearchBox.
  3. Save state.
  4. Refresh the page and apply the state.
  5. The value is present in the searchbox but the X icon is missing.

Expected (if bug)

The X icon should be visible.

Browser (if bug)
All

Project type (if bug)
All

Last working version of Telerik UI for Blazor (if regression)
3.5.0

Duplicated
Last Updated: 29 Aug 2022 10:26 by Sofronis

As you can see in the provided example : https://blazorrepl.telerik.com/QcaiPbkL56qf6XQ747

I have the following situation. I'm using a custom editor template with two-way binding for the  column : OrderToEdit.ShipCity. If I change the value of this column in a row and press Enter, Tab or mouse focus out very quickly (immediately after value change),  UpdateHandler is triggered before the valueChanged event of the context and as a result changes are not shown. If there is a delay ( i.e 1 second ) all works fine. This is not happening when i'm using the builtin editor GridEditorType.TextBox. Could you provide me a solution ? 

There is another problem. if a click inside a cell edit mode is triggered. But if i click in a button in the toolbar or in column menu the cell remains open is not closed. I think this should not happen.

Duplicated
Last Updated: 17 Oct 2022 10:31 by ADMIN
Created by: Mike
Comments: 0
Category: Grid
Type: Feature Request
2

Key events will allow developers to enhance and customize the Grid keyboard navigation. For example -

Detect when the user presses the down-arrow key when on the last grid row. We want to force a "next page" when they do this, and a "previous page" if they are at the top of the grid and press the up-arrow key.

---

ADMIT EDIT

Everyone, please feel free to list other scenarios as well.

Duplicated
Last Updated: 01 Dec 2021 09:54 by ADMIN

I would prefer if you can use the FilterMenuTemplate in such a way that you can fetch also "filter criteria" from other fields/columns.

 

An example:

- grid has 3 coluns > Name, City, Population

- filter mode is set to filter menu and my filter menu should display at the first column.

- after the filter dialog is opened my expactation is that it includes also entries from other fields

 

In summary, my team would welcome the opportunity of central approach for filtering with multiple fields.

 

 

 

Regards,

Özmen

Duplicated
Last Updated: 26 Apr 2022 10:51 by ADMIN
I have a record with id 1. In the OnEdit event, we check if the Edited item has Id == 1 and if so we cancel the edit. Now, the UI, if the Grid is in Read mode (not in Edit) clicking on the Grid cell that has Id == 1 does not trigger the edit, thus the editor is not rendered. On the other hand, if we open a previous cell that is editable and we click enter (tab) multiple times the non-editable cell will enter Edit mode and the editor is rendered.
Duplicated
Last Updated: 06 Oct 2023 07:00 by ADMIN
Created by: Hannes
Comments: 1
Category: Grid
Type: Bug Report
1

Hello,

The Grid header and data cells become misaligned if the user changes the page zoom level. The right padding of the Grid header area resizes, according to the zoom level, but the scrollbar width remains the same. This triggers the misalignment.

The problem disappears after browser refresh at the current zoom level.

Duplicated
Last Updated: 20 Oct 2021 10:57 by ADMIN

When storing and restoring grid state, the selected page size is not included as part of that state currently, and needs to be stored seperately.

(When using GridPagerSettings, the user can select the page size based on inputs provided to PageSizes param. This selection is not synced and will revert to default each time the grid is loaded.

Duplicated
Last Updated: 14 Oct 2021 11:54 by ADMIN
Created by: Huy
Comments: 1
Category: Grid
Type: Bug Report
1

Hi Support,

I found a bug that Telerik grid filter for blazor on web assembly version not working for dynamic datasource. While the server one work just fine. Please see the video for more detail. I am also attach the two solution for your investigation.

https://www.loom.com/share/c876a98500ea4a8fbacd3aa30179485d

 

This same peice of code work in Server version but not for client version

<TelerikRootComponent>
    <TelerikGrid Data="@GridData"
                 Height="350px"
                 Sortable="true"
                 Pageable="true"
                 SortMode="@SortMode.Single"
                 FilterMode="@GridFilterMode.FilterMenu"
                 FilterMenuType="@FilterMenuType.CheckBoxList"
                 PageSize="10">
        <GridColumns>
            <GridColumn Field="Col1" Width="80px" Locked="true" />
            <GridColumn Field="Col2" Width="140px" />
        </GridColumns>
    </TelerikGrid>
</TelerikRootComponent>

@code { public List<dynamic> GridData = new List<dynamic>();

    protected async override Task OnInitializedAsync()
    {
        for (int i = 1; i < 10; i++)
        {
            dynamic row = new ExpandoObject();
            row.Col1 = $"col1_{i}";
            row.Col2 = $"col2_{i}";
            GridData.Add(row);
        }

    } }

 

Please help me fix this issue ASAP as our product need this filter to ship the release.

Thanks

Huy Nguyen

Duplicated
Last Updated: 12 May 2022 17:03 by ADMIN
Created by: Jimmy
Comments: 1
Category: Grid
Type: Bug Report
3
Groups with load on demand cannot be deserialized properly and throw NullReferenceException
Duplicated
Last Updated: 06 Dec 2022 13:54 by ADMIN
Created by: BENAISSA
Comments: 0
Category: Grid
Type: Feature Request
2

In Grid with Filter Menu, I want to trigger the Filter button on Enter press while the focus is still on the filter input.

Currently, it is possible to fire filtering from keyboard only if you tab through the Filter Menu elements to focus the Filter button and then press Enter.

Duplicated
Last Updated: 02 Sep 2021 05:37 by ADMIN
Created by: BENAISSA
Comments: 1
Category: Grid
Type: Feature Request
2

Hi,

 

Is it possible to use ENTER key to validate a popup filter ? instead of mouse.

Use a shortcut to open filter pop of focused column (cell). Ctrl+F or Ctrl+F3...

 

Yours,

Duplicated
Last Updated: 09 Jun 2022 14:13 by ADMIN

Initially, the grid is filtered by "Is FTE? = True". It shows 20 lines. The sum of "Hours" should be 800. But the footer shows another value (depends on the random logic which you've implemented). See the attached screenshot.

Then, when changing the filter, the correct sum is shown.

But I need the correct value initially...

Re: I've just found out that using the OnRead event instead of the standard data binding solves the issue. Better said, it's a possible work-around.

 

Duplicated
Last Updated: 01 Sep 2021 14:26 by ADMIN

Hi,

Is it possible to add a sub menu, in column menu so that the end user can add an aggregate operation (Sum, average...) on any column he wants and the foot panel will be automatically displayed or hidden.

Yours,

1 2 3