Completed
Last Updated: 21 May 2020 14:14 by ADMIN
Release 2.13.0
Created by: Earl
Comments: 12
Category: Grid
Type: Feature Request
74

Hello,

I am new to your Blazor UI components.  Please provide a link for exporting a grid to excel.

 

Thanks,

 

Earl

 

Completed
Last Updated: 19 May 2021 06:59 by ADMIN
Release 2.25.0
Created by: Christian
Comments: 6
Category: Grid
Type: Feature Request
64

I would like to be able to do something like

<GridCommandColumn>
@{
context as MyModel;
if(context.ShowButton)
{
<GridCommandButton>Todo</GridCommandButton>
}
}
</GridCommandColumn>

 

---

ADMIN EDIT

See the thread below for a way to implement this right now with your own buttons in a "regular" column and the grid state.

---

Completed
Last Updated: 30 Mar 2021 17:40 by ADMIN
Release 2.23.0
Created by: Karl
Comments: 4
Category: Grid
Type: Feature Request
60

Hello,

I am currently fiddling around with the Blazor UI, mainly the grid. I was wondering if it is possible to configure the grid to automatically fit the columns to the contents they have?

 

Meaning that the width of the header and the content cells of a given column are automatically set to a value which best fits either the cells content or the header title (depending on what takes up more space).

 

Best Regards,

 

Karl

Completed
Last Updated: 11 Jan 2021 14:33 by ADMIN
Release 2.21.0
Created by: Dan
Comments: 2
Category: Grid
Type: Feature Request
59
When loading large datasets, it would be nice if there was an ability to trigger an animation or loading modal.  Similarly, filtering a large dataset causes a delay that can result in lost key presses when typing a few characters into the filter.  Interrupting with an animation or modal would be helpful there (as would the ability to specify a custom delay on filtering after keypress).
Completed
Last Updated: 22 Jun 2020 10:21 by ADMIN
Release 2.15.0
Created by: Nick
Comments: 0
Category: Grid
Type: Feature Request
54
For the time being, you can use a custom template to attach the handlers to your own elements (e.g., to the <td> if you use a RowTemplate).
Completed
Last Updated: 04 Nov 2024 07:52 by Jesper
Release 3.0.0
Created by: License
Comments: 9
Category: Grid
Type: Feature Request
53

With OnRead, AllPages cannot be exported because the grid Data only has the current page: https://docs.telerik.com/blazor-ui/components/grid/export/excel#notes:

If you are using the OnRead event, only the current page of data will be exported, because that's all the grid has at the time of the export action.

 

I load my data via "OnRead", because i need to implement pagination by myself, and I would like the export option to work with that too.

Completed
Last Updated: 17 Mar 2021 07:21 by Vinodh
Release 2.9.0

I need the ability to show or hide command buttons based on a row's property.

I am aware that I can just cancel commands, but in my opinion, a command button should not even be shown when the command can't or shouldn't be executed on a row.

Unfortunately, I was unable to find a way to access the "context" (the instance) in a TelerikGridCommandColumn the same way you're able to in a normal TelerikGridColumn.

---

ADMIN EDIT

You can Vote for and Follow this request for a follow up on providing the model as context to the command column: https://feedback.telerik.com/blazor/1461283-pass-the-model-context-to-command-button. At the moment, conditional command buttons are possible in a "normal" column through the grid state, the page above shows an example.

---

Completed
Last Updated: 13 Mar 2024 06:02 by ADMIN
Release 2024 Q2 (May)

Hello,

Do you have any sample for custom group Header template.

 

e..g. To  calculate the value of the column based on the other fields.

---

ADMIN EDIT

---

Once aggregates for all fields are exposed, we will need to provide an option to align them with the corresponding columns. This can be achieved through a GroupHeaderColumnTemplate which is targeted in a separate request.

Completed
Last Updated: 22 Nov 2022 13:24 by ADMIN
Release 2.25.0

Grid column header and content alignment (horizontal +Vertical)

---

ADMIN EDIT

For the time being, this is possible through the CellRender event, see below in the thread for an example.

---

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

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

 

Completed
Last Updated: 30 Jun 2020 06:55 by ADMIN
Release 2.15.0
Created by: Alden
Comments: 17
Category: Grid
Type: Feature Request
44

---

ADMIN EDIT: Check the source code and comments in it from the following demo to see how to bind the grid to a DataTable: https://demos.telerik.com/blazor-ui/grid/data-table. You can also examine it offline - the entire demos project is available in the "demos" folder of your installation

The sample code snippet below will let the grid show data, but will not enable complex operations like filtering and sorting. Review the demo linked above for more details on the correct approach.

---

 

I would like to be able to supply a DataTable with an arbitrary amount of columns to the grid and display them all without declaring them all. This should also allow paging, sorting, filtering. At the moment binding to a DataTable is not supported, only IEnumerable collections are.

At the moment, here's the closest I can get, sorting and filtering throw errors so they are disabled.

 

@using System.Data
@using Telerik.Blazor
@using Telerik.Blazor.Components.Grid
 
<button class="btn btn-primary" @onclick="@LoadData">Load Data</button>
 
@if (@d != null)
{
    <TelerikGrid Data=@d.AsEnumerable() TItem="DataRow"
                 Sortable="false" Filterable="false" Pageable="true" PageSize="3"
                 Height="400px">
        <TelerikGridColumns>
            @foreach (DataColumn col in d.Columns)
            {
                <TelerikGridColumn Field="@col.ColumnName" Title="@col.ColumnName">
                    <Template>
                        @((context as DataRow).ItemArray[col.Ordinal].ToString())
                    </Template>
                </TelerikGridColumn>
            }
        </TelerikGridColumns>
    </TelerikGrid>
}
 
@functions {
    DataTable d = null;
 
    void LoadData()
    {
        d = GetData();
    }
 
    public DataTable GetData()
    {
        DataTable table = new DataTable();
 
        table.Columns.Add("Product", typeof(string));
        table.Columns.Add("Price", typeof(double));
        table.Columns.Add("Quantity", typeof(int));
        table.Columns.Add("AvailableFrom", typeof(DateTime));
 
        table.Rows.Add("Product 1", 10.1, 2, DateTime.Now);
        table.Rows.Add("Product 2", 1.50, 10, DateTime.Now);
        table.Rows.Add("Product 3", 120.66, 5, DateTime.Now);
        table.Rows.Add("Product 4", 30.05, 10, DateTime.Now);
 
        return table;
    }
}

 

Completed
Last Updated: 22 Apr 2020 16:18 by ADMIN
Release 2.11.0
Created by: devon
Comments: 17
Category: Grid
Type: Feature Request
43

ADMIN EDIT: The following knowledge base article has been updated to explain how to use nested models: https://docs.telerik.com/blazor-ui/knowledge-base/grid-bind-navigation-property-complex-object

 

At the moment, you must use flat models with primitive types for binding the grid. If you don't, the data source operations break and they can't even display "nested" values. Examples here and here.

I would like to be able to use my complex models so I can point a grid's column to a field like MyModel.MyNestedModel.MyPrimitiveField

My be related to binding to a data table and dynamic expando.

Completed
Last Updated: 15 Nov 2021 12:51 by ADMIN
Created by: Christian
Comments: 5
Category: Grid
Type: Feature Request
42

I want the grid to be able to resize all the columns (or only certain columns) to fit their data, when the data loads, without the user having to double click the border between them.

---

ADMIN EDIT

Automatic application of the auto fitting will come with a flicker, and that's why it was declined as a feature originally. In Blazor we have a detachment between code and when exactly something is rendered. So, we have no way to trigger the resizing logic immediately after the columns content is rendered. The events that are available will cause a flicker and can cause a performance hit - both for the browser and also by raising StateChanged multiple times.

Another caveat is how would this be exposed for configuration - should it work for all columns at once, or only for certain columns (how to control for which ones), how to control which data-related events should invoke this logic (or should it happen super often on any event). Exposing such configuration is likely to lead to a property hell type of situation.

Perhaps a way to get this would be to provide API on the grid to invoke that functionality that you can call as required by your logic and UX: https://feedback.telerik.com/blazor/1513384-programmatically-invoke-fit-to-width-functionality-for-the-grid-columns.

Nevertheless, we will keep this open to monitor for feedback, what is requested, interest and how people would want it exposed. Leave your comments and preferences here.

---

Completed
Last Updated: 05 Jul 2023 11:22 by ADMIN
Release 4.4.0 (07/19/2023) (R3 PI1)
Currently, I have no control over the Filter/Clear actions in the FilterMenu. It will be nice to be able to control them.
Completed
Last Updated: 12 Jun 2024 11:29 by ADMIN
Release 2.18.0

Please add an attribute to Blazor GridColumn which allows to easily format data with the default .NET standard formats

e.g. <GridColumn Field="@(nameof(Item.Price))" Title="Price" Format="0#.##" />

It's a little bit annoying always having to define a template for this purpose.

 


Not Logged in

Completed
Last Updated: 27 Jul 2021 05:55 by ADMIN
Release 2.26.0
Created by: Darryl
Comments: 2
Category: Grid
Type: Feature Request
38

I know that I can bind the PageSize property to a variable, but then I have to build a dropdown with the available page sizes in a separate control. Are there plans to integrate a page size selection into the existing paging controls? Perhaps a PageSizes property that takes an array of integers.

Example:

PageSizes = "[10, 25, 50, 100]"

These would then be converted into a dropdown integrated into the existing paging controls on the grid.

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.

---

TELERIK EDIT

The officially supported way to clear the GridSeachBox is through the Grid state. You can see an example in the Grid SeachBox documentation.

A possible workaround for old versions is to clear the search textbox with JavaScript and to trigger its input event:

@inject IJSRuntime js

<TelerikGrid Data="@GridData"
             Pageable="true"
             Sortable="true"
             Class="custom-grid-class">
    <GridToolBarTemplate>
        <GridSearchBox />
        <TelerikButton Icon="@SvgIcon.X" OnClick="@OnClearButtonClick"></TelerikButton>
    </GridToolBarTemplate>
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.Description)" />
    </GridColumns>
</TelerikGrid>

<script suppress-error="BL9992">//
    function clearSearch() {
        // locate the searchbox of the Grid
        const input = document.querySelector(".custom-grid-class .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} ));
    }
//</script>

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

    private async Task OnClearButtonClick()
    {
        await js.InvokeVoidAsync("clearSearch");
    }

    protected override void OnInitialized()
    {
        for (int i = 1; i <= 50; i++)
        {
            GridData.Add(new SampleModel()
            {
                Id = i,
                Name = $"{(char)(64 + i % 26 + 1)}{(char)(64 + i % 26 + 1)} {i}",
                Description = $"{(char)(123 - i % 26 - 1)}{(char)(123 - i % 26 - 1)} {i}"
            });
        }
    }

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

 

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?
Completed
Last Updated: 27 Apr 2021 07:14 by ADMIN
Created by: Ryan
Comments: 12
Category: Grid
Type: Feature Request
36

How would you remove the icon to expand a detail grid only for certain rows?  Some rows will not have detail data and should not be expandable.

---

ADMIN EDIT

As suggested by Joel, you can use the RowRender event and a bit of CSS to hide the button. Here is a Knolwdge Base article that shows a fully runnable sample: https://docs.telerik.com/blazor-ui/knowledge-base/grid-conditional-expand-button.


in the main TelerikGrid node, add event hook OnRowRender="@OnRowRenderHandler"

that handler is something like:

    void OnRowRenderHandler(GridRowRenderEventArgs args)
    {
        OrgUnit item = args.Item as OrgUnit;

        args.Class = item.Children.length ? "has-children" : "no-children";
    }


Then in the site.css I override display of the hierarchy sign

tr.no-children .k-hierarchy-cell *{
    display:none !important;
}

Completed
Last Updated: 10 Sep 2020 11:02 by ADMIN
Release 2.17.0
Created by: Nick
Comments: 5
Category: Grid
Type: Feature Request
36
It would also be good to be able to sort by multiple columns which I don't think is currently supported?
1 2 3 4 5 6