Completed
Last Updated: 13 Jun 2022 10:58 by ADMIN
Release 3.4.0
Created by: Robert
Comments: 1
Category: Grid
Type: Feature Request
17
I would like to have a HeaderTemplate for the GridCheckboxColumn so that I could customize the behavior of the Select all checkbox. 
Duplicated
Last Updated: 30 Mar 2023 08:15 by ADMIN
Created by: Daniel
Comments: 3
Category: Grid
Type: Feature Request
3

I am trying to get the currently filtered data out of the grid as per this KB article and I want to include the searchbox filters. I do not, however, want to use OnRead but I want to get the grid state on a click of a button and get the filters plus the searchbox filters from it instead.

---

ADMIN EDIT

Here is a sample of getting those filters through the OnRead event without using remote operations - all the data is in the view model (the SourceData field) so this does not change the way operations happen compared to not using OnRead.

@using Telerik.DataSource
@using Telerik.DataSource.Extensions

@( new MarkupString(output) )

<br />
<TelerikButton OnClick="@GetFilters">Get Filters</TelerikButton>


<TelerikGrid Data=@GridData TotalCount=@Total OnRead=@ReadItems
             FilterMode=@GridFilterMode.FilterRow Sortable=true Pageable=true EditMode="@GridEditMode.Inline">
    <GridToolBar>
        <GridSearchBox />
    </GridToolBar>
    <GridColumns>
        <GridColumn Field=@nameof(Employee.ID) />
        <GridColumn Field=@nameof(Employee.Name) Title="Name" />
        <GridColumn Field=@nameof(Employee.HireDate) Title="Hire Date" />
        <GridCommandColumn>
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
            <GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
            <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
</TelerikGrid>

@code {
    TelerikGrid<Employee> GridRef { get; set; }
    string output { get; set; }
    public DataSourceRequest CurrentRequest { get; set; }
    void GetFilters()
    {
        output = string.Empty;


        foreach (var item in CurrentRequest.Filters)
        {
            if (item is FilterDescriptor) // filter row
            {
                FilterDescriptor currFilter = item as FilterDescriptor;
                output += $"field: {currFilter.Member}, operator {currFilter.Operator}, value: {currFilter.Value}<br />";
            }

            if (item is CompositeFilterDescriptor) // filter menu
            {
                CompositeFilterDescriptor currFilter = item as CompositeFilterDescriptor;
                output += $"START nested filter: logical operator: {currFilter.LogicalOperator}, details:<br />";
                // there will actually be 1 or 2 only, this showcases the concept and the types
                foreach (FilterDescriptor nestedFilter in currFilter.FilterDescriptors)
                {

                    output += $"field: {nestedFilter.Member}, operator {nestedFilter.Operator}, value: {nestedFilter.Value}<br />";
                }
                output += "END nested filter<br />";
            }
        }
    }




    public List<Employee> SourceData { get; set; }
    public List<Employee> GridData { get; set; }
    public int Total { get; set; } = 0;

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

    protected async Task ReadItems(GridReadEventArgs args)
    {
        CurrentRequest = args.Request;


        var datasourceResult = SourceData.ToDataSourceResult(args.Request);

        GridData = (datasourceResult.Data as IEnumerable<Employee>).ToList();
        Total = datasourceResult.Total;

        StateHasChanged();
    }

    //This sample implements only reading of the data. To add the rest of the CRUD operations see
    //https://docs.telerik.com/blazor-ui/components/grid/editing/overview

    private List<Employee> GenerateData()
    {
        var result = new List<Employee>();
        var rand = new Random();
        for (int i = 0; i < 100; i++)
        {
            result.Add(new Employee()
            {
                ID = i,
                Name = "Name " + i,
                HireDate = DateTime.Now.Date.AddDays(rand.Next(-20, 20))
            });
        }

        return result;
    }

    public class Employee
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public DateTime HireDate { get; set; }
    }
}

---

Unplanned
Last Updated: 27 Oct 2022 09:28 by ADMIN

I am using this sample to implement server-side grouping:

https://github.com/telerik/blazor-ui/tree/master/grid/datasourcerequest-on-server/WasmApp

Now I need Aggregate sum for the price in the GroupFooterTemplate. When I add aggregates, exceptions are thrown if a group footer uses the aggregate value, if not - the grid simply does not look grouped.

---

ADMIN EDIT

The issue stems from the inability of the System.Text.Json to deserialize interfaces - there are a couple of interfaces in the datasource request and data source result related to aggregates. Preliminary review indicates that perhaps some or all of them might be changed to, for example, Dictionary<string, object> from the current IDictionary<string, object>, or perhaps the framework might "learn" to deserialize interfaces.

----

Unplanned
Last Updated: 15 Feb 2022 16:25 by Jeffrey
Created by: Wei
Comments: 1
Category: Grid
Type: Feature Request
19
I am using InCell editing with an editor template and when I use the State to close the cell for editing, the grid re-renders and focus is lost. I need a method to call after the state call that will focus the cell of the grid - it could take the row model and a field name as parameters to know which cell to focus.
Completed
Last Updated: 16 Nov 2021 14:38 by ADMIN
Release 2.30.0

I have a reset all button that clears a grid of all column, filter, sorts etc.

I need it to also reset any searchbox criteria.  I can easily clear the searchbox of it's value using javascript, but this does not then trigger the searchbox to reset the grid.

---

ADMIN EDIT

A workaround could be to clear the input with a bit of JS and to trigger its input event so it bubbles up to the Blazor code. Something like:

// locate the searchbox of the Grid
const input = document.querySelector(".k-grid-search input"); 
// clear the value of the input
input.value = ""; 
// dispatch the input event in order to force the Grid event binding to trigger the filtering
input.dispatchEvent(new Event('input', {bubbles: true} ));

---

Duplicated
Last Updated: 20 Nov 2020 17:14 by ADMIN
Created by: Scott Mappes
Comments: 1
Category: Grid
Type: Feature Request
0

I'm using the Grid with a GridToolbar containing a GridSearchBox.  I have the following requirement that I wish to be able to implement:

When focus is on the GridSearchBox and I hit Esc I would like to clear the search text.

Unplanned
Last Updated: 04 Nov 2020 15:20 by ADMIN

When I have a grid with Reordable=true and a ComboBox in the HeaderTemplate, I cannot click in the combo box because the reordable functionality prevents it.

---

ADMIN EDIT

This could be exposed through a data- attribute that you could add to your DOM elements so that the grid can know to skip them, for example:

<TelerikGrid Data="@MyData" Height="300px" Pageable="true" Sortable="true" FilterMode="@GridFilterMode.FilterMenu" Reorderable="true">
    <GridColumns>
        <GridColumn Field="@(nameof(SampleData.ID))" Title="This title will not be rendered">
            <HeaderTemplate>
                Continent <br />
                <div style="text-align:center">Id</div>
                <div @onclick:stopPropagation="true" data-draggable="false">
                    <TelerikComboBox Data="@Continents" Filterable="true" class="headerCombo"
                                     @bind-Value="@SelectedContinentId"
                                     TextField="@nameof(Continent.Name)" ValueField="@nameof(Continent.Id)" Id="MyId">
                    </TelerikComboBox>
                </div>
            </HeaderTemplate>
        </GridColumn>
        <GridColumn Field=@nameof(SampleData.Name) Title="First Name" />
    </GridColumns>
</TelerikGrid>

@code {
    /* Grid */
    string result { get; set; }
    void DoSomething()
    {
        result = $"button in header template clicked on {DateTime.Now}, something happened";
    }

    public class SampleData
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public DateTime HireDate { get; set; }
    }

    public IEnumerable<SampleData> MyData = Enumerable.Range(1, 50).Select(x => new SampleData
    {
        ID = x,
        Name = "name " + x,
        HireDate = DateTime.Now.AddDays(-x)
    });

    /* ComboBox */

    public class Continent
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
    IEnumerable<Continent> Continents = new List<Continent>() { new Continent { Id = 1, Name = "Africa" }, new Continent { Id = 2, Name = "Asia" }, new Continent { Id = 3, Name = "South America" } };
    public int SelectedContinentId { get; set; } = 1;

}

---

Completed
Last Updated: 11 Jan 2024 14:04 by ADMIN
Release 3.0.0

https://docs.telerik.com/blazor-ui/components/grid/editing/incell#notes 

I am using an EditorTemplate with a method called ChangeHandler(). After clicking in another row everything works fine but if I leave the cell by pressing enter the UpdateHandler gets called more than two times and comparing args.Item with the GridItem doesn't help because the calls are asynchronous.

=====

Admin Edit

With 2.22.0, the InCell editing mode was revamped to provide better user experience and this alters the way it worked. In the common case, there will no longer be double OnUpdate calls (unless explicit application logic invokes them). With 2.23.0, Tab and Enter keys that bubble from editor templates will be handled by the grid like they are handled for the built-in editors.

This means that this issue is, effectively, solved. You can see the Notes section about editor templates to see how you can also handle the OnBlur event to capture mouse clicks outside of the component so that you can save changes and remove the edited item. See the full notes here (the Event Sequence section was heavily revamped for clarity) and here on editor template behavior.

Thus, the previous ides about  Save and Cancel methods on the edit context might not be implemented, which will also be one breaking change that we could avoid:

After discussion with the development team, the proposed resolution is to provide a context that provides Save/Cancel operations. The goal is to provide easier configuration for IncellEditing and EditorTemplates and consistent behavior with mouse and keyboard interaction. However, the change will introduce a breaking change in our EditorTemplate, should be researched further and that is why this is logged as a feature request.

=====

Unplanned
Last Updated: 03 Nov 2020 14:19 by ADMIN

This will let Excel mark the field as a Date and act according to the current culture on the machine that opens the file.

---

ADMIN EDIT:

This feature would let you define custom formats, so you may want to Vote for it and Follow it too: Custom Format for Excel Export per column. It is important to keep in mind that the Excel formats are completely different from the .NET formats.

If this is of high importance for you right now, you could create your own Excel file with the desired settings by following the example from this thread.

---

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

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: 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
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: 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
44

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**