Completed
Last Updated: 01 Dec 2020 16:04 by ADMIN
Release 2.19.0

On initialization of the Grid the oDataString is correct, but when I apply a Filter (through the FilterMenu) or apply a sort to a Grid column the ToODataString extension method throws with null reference exception. If the FilterMode is set to FilterRow or revert back to 2.16.0 everything works as expected. 

<AdminEdit>

This bug extends to the functionality of the FilterMenu as a feature and is not connected only to the ToODataString();

</AdminEdit>

Completed
Last Updated: 24 Nov 2021 07:10 by ADMIN
Release 2.30.0
Created by: Edward
Comments: 5
Category: Grid
Type: Feature Request
22

It will be useful if the grid column state contains the Field parameter if such is specified.

This will make easier mapping the ColumnState entity to the actual column.

 

----

ADMIN EDIT

While this feature is implemented, you can get the Field of ColumnState columns using the workaround shown in this article: https://docs.telerik.com/blazor-ui/components/grid/state#get-current-columns-visibility-order-field

----
Completed
Last Updated: 24 Nov 2021 12:40 by ADMIN

I am using EF on my backend and when I group I get an error like this one:

Unhandled exception rendering component: Processing of the LINQ expression '(GroupByShaperExpression:
      KeySelector: (t.FirstName), 
      ElementSelector:(EntityShaperExpression: 
          EntityType: Customer
          ValueBufferExpression: 
              (ProjectionBindingExpression: EmptyProjectionMember)
          IsNullable: False
      )
      )' by 'RelationalProjectionBindingExpressionVisitor' failed. This may indicate either a bug or a limitation in EF Core. See https://go.microsoft.com/fwlink/?linkid=2101433 for more detailed information.
System.InvalidOperationException: Processing of the LINQ expression '(GroupByShaperExpression:
KeySelector: (t.FirstName), 
ElementSelector:(EntityShaperExpression: 
    EntityType: Customer
    ValueBufferExpression: 
        (ProjectionBindingExpression: EmptyProjectionMember)
    IsNullable: False
)
)' by 'RelationalProjectionBindingExpressionVisitor' failed. This may indicate either a bug or a limitation in EF Core. See https://go.microsoft.com/fwlink/?linkid=2101433 for more detailed information.
   at Microsoft.EntityFrameworkCore.Query.Internal.RelationalProjectionBindingExpressionVisitor.VisitExtension(Expression extensionExpression)
   at System.Linq.Expressions.Expression.Accept(ExpressionVisitor visitor)

 

and a lot more line through the EF Core expression classes.

-----

ADMIN EDIT

At the moment, it looks like there is an issue between EF, LINQ and GroupBy expressions that seems to be the origin of this. In a profiler, you can see that running a group expression does not even run a query against the database itself - this is the origin of the problem, and the subsequent paging operation is where an actual exception is thrown, but it points to the field that was used for grouping.

Considering that grouping has to pull all the data anyway, materializing the data from an IQueriable to an IEnumerable should solve the issue, even though it can be a performance hit - for relatively small data sets it may not be a significant problem.

    protected override void OnInitialized()
    {
        GridData = ProductService.GetProducts().ToList();
    }

 

----

Completed
Last Updated: 07 Jun 2022 06:44 by ADMIN
Release 3.4.0
Created by: Michael
Comments: 2
Category: Grid
Type: Feature Request
26

I want to customize the appearance of the header of a certain column, and a bit of CSS backgrounds could help, but I can't do this with the HeaderTemplate alone, nor with content in it because of the padding the cells have.

So, I would like the ability to set the CSS class of the header cell of the column.

Completed
Last Updated: 30 Dec 2021 18:23 by ADMIN
Release 2.24.0
Created by: Wei
Comments: 6
Category: Grid
Type: Feature Request
37
there is a feature we want to implement in grid for a row to be dragged and dropped onto another row. is this something we can do with blazor grid?

drag one row or multiple row over another row and have the drop event exposed so we can handle it?
Unplanned
Last Updated: 30 Sep 2020 12:19 by ADMIN

At the moment, the CollapsedGroups  collection in the grid state is the indexes of the root-level groups that you can collapse. I want to also be able to control the expanded state of nested groups.

ADMIN EDIT:

Ideas I can see are the following, do add your vote and comments on how you expect that to be exposed:

  • a form of Id/field in the group descriptor that controls this. Caveat - groups don't generally have such an id and the descriptor does not control the UI, it controls the data.
  • an event that provides the level, field name and group value that lets me choose this for every group as it renders. Caveat - might not plug in the state, but if you have a certain business logic for that you can just keep it in that event always, regardless of the grid state, or keep additional information in an application state.
  • the current indexes could become recursive (see the image attached below). Caveat: you can't be sure that the next time data loads the data and so the groups will be the same when loading state
Completed
Last Updated: 27 Oct 2023 13:36 by ADMIN
Release 5.0.0 (15 Nov 2023) (R1 PI1)
The Grid throws on Dispose when there is a Tabstip also on the same razor page. When there is not Tabstrip the Grid does not throw this exception. 
Duplicated
Last Updated: 29 Sep 2020 07:42 by ADMIN
Created by: Emanuele
Comments: 1
Category: Grid
Type: Feature Request
0

it would be helpful to have the ability to set Class attribute for rendered TD.

this would allow for example to set a background color for a column

Unplanned
Last Updated: 26 Sep 2020 08:26 by ADMIN
Created by: Jan Hindrik
Comments: 0
Category: Grid
Type: Feature Request
1
I want to set such a class dynamically based on some of the aggregation values, and the current field and its value. Using the template does not suffice fully because it is inside the cell, so styling the entire cell is difficult, and styling the entire row is impossible.
Unplanned
Last Updated: 26 Sep 2020 08:23 by ADMIN
Created by: Jan Hindrik
Comments: 0
Category: Grid
Type: Feature Request
1

For example, when I have two levels of grouping, I want to render only the inner footer templates, but not the outer.

While this is possible with some CSS like the snippet below, this does not scale well, and does not work well for arbitrary number of groups

<style>
    .k-group-footer + .k-group-footer {
       display:none;
    }
</style>

Group by the Vacation and Team columns to see the effect

<TelerikGrid Data=@GridData Groupable="true" Pageable="true">
    <GridColumns>
        <GridColumn Field=@nameof(Employee.Name) Groupable="false" />
        <GridColumn Field=@nameof(Employee.Team) Title="Team">
            <GroupFooterTemplate>
                Team group footer
            </GroupFooterTemplate>
        </GridColumn>
        <GridColumn Field=@nameof(Employee.IsOnLeave) Title="On Vacation">
            <GroupFooterTemplate>
                IsOnLeave group footer
            </GroupFooterTemplate>
            </GridColumn>
    </GridColumns>
</TelerikGrid>

@code {
    public List<Employee> GridData { get; set; }

    protected override void OnInitialized()
    {
        GridData = new List<Employee>();
        var rand = new Random();
        for (int i = 0; i < 15; i++)
        {
            GridData.Add(new Employee()
            {
                EmployeeId = i,
                Name = "Employee " + i.ToString(),
                Team = "Team " + i % 3,
                IsOnLeave = i % 2 == 0
            });
        }
    }

    public class Employee
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; }
        public string Team { get; set; }
        public bool IsOnLeave { get; set; }
    }
}

Unplanned
Last Updated: 26 Sep 2020 08:21 by ADMIN
There is an order to the grouping level - field1, field2 and so on - I would like that current index in that order exposed by the grouping templates so I can know in which position they are and whether/how far they are nested.
Unplanned
Last Updated: 23 Apr 2022 19:08 by ADMIN
I need the current value by which the field is grouped (the group value) so I can get additional information and display it in the cell
Completed
Last Updated: 19 Apr 2021 18:11 by ADMIN
Release 2.24.0

If I add an await-ed call in the OnRowClick handler, then I cannot alter the grid state later in the code. It only works if the method is called again (e.g., a second click on the same row).

<AdminEdit>

This affects other Grid events too, for example, the PageChanged

</AdminEdit>

A workaround is to use synchronous code (remove the await call):

@inject IJSRuntime JsInterop

<TelerikGrid Data="@salesTeamMembers" OnRowClick="@OnRowClickHandler" @ref="@GridRef">
    <DetailTemplate>
        @{
            var employee = context as MainModel;
            <TelerikGrid Data="employee.Orders" Pageable="true" PageSize="5">
                <GridColumns>
                    <GridColumn Field="OrderId"></GridColumn>
                    <GridColumn Field="DealSize"></GridColumn>
                </GridColumns>
            </TelerikGrid>
        }
    </DetailTemplate>
    <GridColumns>
        <GridColumn Field="Id"></GridColumn>
        <GridColumn Field="Name"></GridColumn>
    </GridColumns>
</TelerikGrid>

@code {
    List<MainModel> salesTeamMembers { get; set; }
    TelerikGrid<MainModel> GridRef { get; set; }

    async Task OnRowClickHandler(GridRowClickEventArgs args) {
        // After adding this line, it now requires a double click when the InvokeAsync call uses "await"
         var width = JsInterop.InvokeAsync<int>("getWidth");


        var model = args.Item as MainModel;
        int index = salesTeamMembers.IndexOf(model);
        //todo: you may want to take paging into account for example, or use js interop to get the index of the row based on contents from it like id
        if (index > -1) {
            var state = GridRef.GetState();
            state.ExpandedRows = new List<int> { index };

            await GridRef.SetState(state);
        }

    }


    protected override void OnInitialized() {
        salesTeamMembers = GenerateData();
    }

    private List<MainModel> GenerateData() {
        List<MainModel> data = new List<MainModel>();
        for (int i = 0; i < 5; i++) {
            MainModel mdl = new MainModel { Id = i, Name = $"Name {i}" };
            mdl.Orders = Enumerable.Range(1, 15).Select(x => new DetailsModel { OrderId = x, DealSize = x ^ i }).ToList();
            data.Add(mdl);
        }
        return data;
    }

    public class MainModel {
        public int Id { get; set; }
        public string Name { get; set; }
        public List<DetailsModel> Orders { get; set; }
    }

    public class DetailsModel {
        public int OrderId { get; set; }
        public double DealSize { get; set; }
    }
}

 

 

Completed
Last Updated: 10 Nov 2020 10:04 by ADMIN
Release 2.19.0
Created by: Jan Hindrik
Comments: 0
Category: Grid
Type: Bug Report
4

Sample reproducible with workaround (to initialize the data source so it is not null) is below

Sample error and stack trace

ArgumentNullException: Value cannot be null. (Parameter 'source')


System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
Telerik.Blazor.Components.TelerikGrid<TItem>.SetAggregateResults(IEnumerable<AggregateResult> results)
Telerik.Blazor.Components.Common.DataBoundComponent<TItem>.AggregateData()

 

<TelerikGrid Data=@GridData Pageable="true" Height="300px">
    <GridColumns>
        <GridColumn Field="@(nameof(Employee.EmployeeId))">
            <FooterTemplate>
                some footer
            </FooterTemplate>
        </GridColumn>
        <GridColumn Field=@nameof(Employee.Salary) Title="Salary">
        </GridColumn>
        <GridColumn Field=@nameof(Employee.Name)>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

@code {
    public List<Employee> GridData { get; set; } // = new List<Employee>(); // workaround

    public class Employee
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; }
        public decimal Salary { get; set; }
    }
}

 

Completed
Last Updated: 22 Jan 2021 15:53 by ADMIN
Release 2.21.1
1. Replace MainLayout with TelerikDrawer https://github.com/telerik/blazor-ui/tree/master/drawer/template
2. Place simple Grid with detail template https://docs.telerik.com/blazor-ui/components/grid/hierarchy
3. Bug - Latest column from parent grid becomes disabled for sorting.

<TelerikGrid Data="salesTeamMembers" @ref="Grid" Sortable="true" FilterMode=@GridFilterMode.FilterMenu Height="780px">
    <DetailTemplate>
           <span>Any template</span>
        </DetailTemplate>
    <GridColumns>
        <GridColumn Field="Id"></GridColumn>
        <GridColumn Field="Name" ></GridColumn>
        <GridColumn Field="Order"></GridColumn>
    </GridColumns>
</TelerikGrid>

If remove detail tempate, all columns becomes availavle for sorting as expected
Completed
Last Updated: 02 Dec 2021 20:25 by ADMIN
Release 2.30.0
Created by: Jurgen
Comments: 3
Category: Grid
Type: Feature Request
17

I want to edit the Excel file the grid exports before it gets to the user. For example, to add a sheet with data I want to generate, or to change columns, formats, colors.

----

ADMIN EDIT

I have attached to this post an example that shows how you can generate your own exported file so you can customize colors, sheets and so on. It also shows how to cache the DataSourceRequest of the grid so you can extract only the current page or all data, and so you can also apply the current grid sorts/filters and so on to the export. This also lets you add metadata to the sheet such as the current user settings such as filters that resulted in this filter.

----

Completed
Last Updated: 18 Jan 2024 09:10 by ADMIN
Created by: Aditya
Comments: 13
Category: Grid
Type: Feature Request
46

I want to be able to enter numbers and the grid to filter numeric fields too according to those numbers. Enums would be nice too.

 

**Admin Edit**

The feature request will be researched and evaluated. It contradicts to our datasource filtering logic that relies on the type of the fields. Thus, it is highly possible that we will handle the task through a knowledge base example.

**Admin Edit**

 

Unplanned
Last Updated: 22 Sep 2020 13:20 by ADMIN
Created by: Software
Comments: 1
Category: Grid
Type: Feature Request
3

Please add a feature to export the grid to Microsoft Word file

---

ADMIN EDIT:

I am attaching a sample to this post that you can use to generate the docx file through the Telerik Document Processing libraries by looping over the data.

You can extend it further (add more fields, refactor so it is more reusable, extract to service,...) and if you would like to export the current grid data, see about implementing the data operations manually through the OnRead event - you can cache the DataSourceRequest object and then run a .ToDataSourceResult() query on the data to get what the grid displays on its current page. An example of a similar approach is available here for a customized excel export.

You can also read more about working with tables in a Word document here to apply more styling options as needed.

---

Unplanned
Last Updated: 12 Jul 2022 06:51 by ADMIN
Created by: SaiSivaSankar
Comments: 1
Category: Grid
Type: Feature Request
11
I would like to exclude the group header from the horizontal scroll - that is, the group header must always be visible regardless of how the user scrolls the grid left and right, like a Locked column.
Declined
Last Updated: 09 Sep 2020 16:26 by ADMIN

Hello,

When using grid command button edit with the onedit handler shown in this documentation https://docs.telerik.com/blazor-ui/components/grid/editing/inline

There is a bug that causes the grid to reset to the first page when editing the last item on any page that isn't the first. In other words we can edit the last item in the gird on the first page but not on the second, third, fourth...etc. 
I have taken out all the logic in my edit handler as well and the problem still presents itself. 

Below is the relevenat code sample and I have also zipped a short video demonstrating the behavior.

<TelerikGrid @ref="@GridNameHere"
                             Class="smallerFont"
                             Data="@DataHere"
                             Pageable="true"
                             Page="@Page"
                             PageSize="@PageSize"
                             TotalCount="@Total"
                             Sortable="@true"
                             Groupable="@false"
                             FilterMode="@GridFilterMode.FilterMenu"
                             Reorderable="@true"
                             OnEdit="@OnEdit"
                             OnUpdate="@OnUpdate"
                             OnCreate="@OnUpdate">
                    <GridToolBar>
                        <GridCommandButton Command="Add" Icon="add">Add</GridCommandButton>
                    </GridToolBar>
                    <GridColumns>
                        <GridCommandColumn Width="150px">
                            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
                            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Save</GridCommandButton>
                            <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
                        </GridCommandColumn>

                        <GridColumn Field="@(nameof(ModelName.FieldName))" Title="Column Name" Width="100px" />

                    </GridColumns>
                </TelerikGrid>

//Handler for edit

 protected void OnEdit(GridCommandEventArgs args)
{

// no code in here and problem still presents itself but feel free to put anything I recommend using the sample from the documentation above

}