Completed
Last Updated: 02 Dec 2021 15:00 by ADMIN
Release 2.30.0
Created by: Arianis
Comments: 0
Category: Grid
Type: Feature Request
9

I would like to export custom data to excel, for example - the selected items.

 

<AdminEdit>

As an attached file, you can see a sample implementation that shows how you can export the Selected Items from the Grid to excel.

</AdminEdit>

Completed
Last Updated: 17 Sep 2019 12:17 by ADMIN
Release 2.0.0
Created by: Gordon
Comments: 0
Category: Grid
Type: Bug Report
9

When there are wide columns that produce a horizontal scrollbar, scrolling horizontally does not scroll the headers. It must.

WORKAROUND (see also the rules for the containing div that provides the scroll):

<style>
    .k-grid,
    .k-grid-container,
    .k-grid-content.k-virtual-content {
        display: inline-block;
    }
</style>

REPRODUCIBLE:

@using Telerik.Blazor.Components.Grid
 
<div style="width: 1200px; overflow-x: auto; overflow-y:hidden; border: 1px solid red;">
    <TelerikGrid Data="@trades" EditMode="inline" Pageable=true PageSize=10>
        <TelerikGridColumns>
            <TelerikGridCommandColumn width="100">
                <TelerikGridCommandButton Command="Edit" Icon="edit">Edit</TelerikGridCommandButton>
                <TelerikGridCommandButton Command="Update" Icon="save" ShowInEdit="true" OnClick="UpdateItem">Update</TelerikGridCommandButton>
                <TelerikGridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true" OnClick="CancelItem">Cancel</TelerikGridCommandButton>
            </TelerikGridCommandColumn>
            <TelerikGridColumn Field="@(nameof(Trade.TradeId))" Width=100></TelerikGridColumn>
            @*<TelerikGridColumn Field="@(nameof(Trade.TradeType))" Width=200></TelerikGridColumn>*@
            <TelerikGridColumn Field=@nameof(Trade.TradeType) Title="Trade Type">
                <EditorTemplate>
                    @{
                        var TradeToEdit = context as Trade;
                        if (TradeToEdit.TradeType == "POWER PHYSICAL")
                        {
                            <select class="form-control d-inline" style="height: 30px" onchange=@SaveItem value=@TradeToEdit.TradeType>
                                <option value="POWER PHYSICAL">POWER PHYSICAL</option>
                                <option value="GAS PHYSICAL"> GAS PHYSICAL</option>
                            </select>
                        }
                        else
                        {
                            <select class="form-control d-inline" style="height: 30px" onchange=@SaveItem value=@TradeToEdit.TradeType>
                                <option value="GAS PHYSICAL"> GAS PHYSICAL</option>
                                <option value="POWER PHYSICAL">POWER PHYSICAL</option>
                                <option value="POWER PHYSICAL">POWER FINANCIAL</option>
                            </select>
                        }
                    }
                </EditorTemplate>
            </TelerikGridColumn>
            <TelerikGridColumn Field="@(nameof(Trade.Company))" Width=500></TelerikGridColumn>
            <TelerikGridColumn Field="@(nameof(Trade.TradeDate))" Width=500></TelerikGridColumn>
            <TelerikGridColumn Field="@(nameof(Trade.BegTime))" Width=500></TelerikGridColumn>
            <TelerikGridColumn Field="@(nameof(Trade.EndTime))" Width=500></TelerikGridColumn>
        </TelerikGridColumns>
    </TelerikGrid>
</div>
 
@functions {
    public class Trade
    {
        public int TradeId { get; set; }
        public string TradeType { get; set; }
        public string Company { get; set; }
        public DateTime TradeDate { get; set; }
        public DateTime BegTime { get; set; }
        public DateTime EndTime { get; set; }
    }
 
    public List<Trade> trades { get; set; }
 
    protected override void OnInit()
    {
        trades = new List<Trade>();
        for (int i = 0; i < 25; i++)
        {
            trades.Add(new Trade()
            {
                TradeId = i,
                TradeType = "type " + i,
                Company = "company " + i,
                TradeDate = DateTime.Now.AddDays(i),
                BegTime = DateTime.Now.AddHours(-i),
                EndTime = DateTime.Now.AddHours(i)
            });
        }
    }
 
    void SaveItem()
    {
 
    }
 
    public void UpdateItem(GridCommandEventArgs e)
    {
 
    }
 
    public void CancelItem(GridCommandEventArgs e)
    {
 
    }
}

Completed
Last Updated: 23 Apr 2020 10:29 by ADMIN
Release 2.13.0

Reproducible:

 

@using System.Collections.ObjectModel;

<div style="align-self:center;text-align:center" class="alert-danger">
    @errorMessages
</div>
<div style="align-self:center;text-align:center" class="alert-success">
    @successMessages
</div>
<TelerikGrid Data=@entitlementsExtended
             Pageable="true"
             Groupable="false"
             PageSize="@PageSize"
             OnUpdate="@UpdateHandler"
             Sortable="false"
             FilterMode="Telerik.Blazor.GridFilterMode.FilterMenu">
    <GridColumns>
        <GridColumn Field="@nameof(EntitlementValueDTOExtended.Description)" Editable="false" />
        <GridColumn Field=@nameof(EntitlementValueDTOExtended.Value)>
            <EditorTemplate>
                @{
                    CurrentlyEditedEntitlement = context as EntitlementValueDTOExtended;
                    <div>
                        <TelerikDropDownList Data="@entitlementOptions" @bind-Value="CurrentlyEditedEntitlement.Value" Width="60px" PopupHeight="auto"></TelerikDropDownList>
                    </div>
                }
            </EditorTemplate>
        </GridColumn>

        <GridCommandColumn Width="300px">
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
            <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
</TelerikGrid>

@code {
    int PageSize = 10;
    public EntitlementValueDTOExtended CurrentlyEditedEntitlement { get; set; } = new EntitlementValueDTOExtended();

        //changing this to List<> works
    public ObservableCollection<EntitlementValueDTOExtended> entitlementsExtended { get; set; } = new ObservableCollection<EntitlementValueDTOExtended>();

    public static List<string> entitlementOptions = new List<string> { "I", "E" };

    public string errorMessages { get; set; } = "";
    public string successMessages { get; set; } = "";

    protected async override Task OnInitializedAsync()
    {
        IEnumerable<int> entitlements = Enumerable.Range(1, 50);

        //this is a simplified workaround for people needing nested models
        foreach (var entitlement in entitlements)
        {
            EntitlementValueDTOExtended entitlementExtended = new EntitlementValueDTOExtended();
            entitlementExtended.Id = Guid.NewGuid();
            entitlementExtended.Description = $"descr {entitlement}";
            entitlementExtended.Value = $"value {entitlement}";
            entitlementExtended.EntitlementTypeId = entitlement;

            entitlementsExtended.Add(entitlementExtended);
        }
        StateHasChanged();

        await base.OnInitializedAsync();
    }

    public async Task UpdateHandler(GridCommandEventArgs args)
    {
        EntitlementValueDTOExtended item = (EntitlementValueDTOExtended)args.Item;

        var matchingItem = entitlementsExtended.FirstOrDefault(c => c.Id == item.Id);
        if (matchingItem != null)
        {
            matchingItem.Description = item.Description;
            matchingItem.EntitlementTypeId = item.EntitlementTypeId;
            matchingItem.Value = item.Value;
        }

        successMessages = $"updated grid on {DateTime.Now}";
        StateHasChanged();

    }

    public class EntitlementValueDTOExtended
    {
        public Guid Id { get; set; }
        public string Description { get; set; } = "";
        public string Value { get; set; } = "";
        public int EntitlementTypeId { get; set; } = 0;
    }

Completed
Last Updated: 28 Jun 2024 09:01 by ADMIN
Release 2024 Q3 (Aug)
When you have a Navigable Grid with a Material theme, the sorting on each click does not work. You have to click outside of the header and click again in it to sort. The behavior can be seen only in version 6.0.0.
Completed
Last Updated: 22 Aug 2023 09:10 by ADMIN
Release 4.5.0 (08/30/2023) (R3 PI2)

By the following steps, the problem occurs:

  1. Click on line number 1 to focus the row
  2. Press the Down-Key 19 times to navigate to line 20
  3. Try to navigate to line 21 via the Down-Key
  4. -> No navigation possible via keyboard to the lines below
  5. Try to navigate backwards via Up-Key to line 1
  6. -> Navigation stops at line 15


So, it not possible to navigate through the whole grid with virtualized rows when Navigable=true





@* Scroll the grid instead of paging *@

<TelerikGrid Data=@GridData
             ScrollMode="@GridScrollMode.Virtual" Navigable="true"
             Height="480px" RowHeight="60" PageSize="20"
             Sortable="true" FilterMode="@GridFilterMode.FilterMenu">
    <GridColumns>
        <GridColumn Field="Id" />
        <GridColumn Field="Name" Title="First Name" />
        <GridColumn Field="LastName" Title="Last Name" />
        <GridColumn Field="HireData" Width="200px">
            <Template>
                @((context as SampleData).HireDate.ToString("MMMM dd, yyyy"))
            </Template>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

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

    protected override async Task OnInitializedAsync()
    {
        GridData = await GetData();
    }

    private async Task<List<SampleData>> GetData()
    {
        return Enumerable.Range(1, 1000).Select(x => new SampleData
        {
            Id = x,
            Name = $"name {x}",
            LastName = $"Surname {x}",
            HireDate = DateTime.Now.Date.AddDays(-x)
        }).ToList();
    }

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

  
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.

=====

Completed
Last Updated: 16 Jan 2020 09:32 by ADMIN
Release 2.6.1
Created by: Nick
Comments: 8
Category: Grid
Type: Bug Report
8

Hi,

I've noticed some odd behaviour where the OnRead event is being called twice. Initially I thought it was my code, but I've got to a bizarre example where having two Console.WriteLine statements causes the repeated call, but having one doesn't!

In my testing with more code in the method it hasn't been consistent, so I'm not sure if it's a timing/threading issue. I have tested with the following:

  • Browser: Firefox and Chrome
  • VS: 16.4 Preview 5.
  • .Net Core: 3.1 Preview 2
  • Telerik: 2.3

My test code looks like this:

 

@layout EmptyLayout
@page "/testgrid"
<TelerikGrid Data=@GridData TotalCount=@Total
             Pageable=true PageSize=15
             OnRead=@ReadItems>
    <GridColumns>
        <GridColumn Field=@nameof(Employee.Id) Title="ID" />
        <GridColumn Field=@nameof(Employee.Name) Title="Name" />
    </GridColumns>
</TelerikGrid>
 
@code {
    public List<Employee> GridData { get; set; }
    public int Total { get; set; } = 0;
 
    protected async Task ReadItems(GridReadEventArgs args)
    {
        Console.WriteLine("ReadItems 1");
        // Remove this line and ReadItems is only called once!!!
        Console.WriteLine("ReadItems 2");
 
        // Adding this makes no difference
        //await Task.Delay(1);
    }
 
    public class DataEnvelope
    {
        public List<Employee> CurrentPageData { get; set; }
        public int TotalItemCount { get; set; }
    }
 
    public class Employee
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
}

 

Any help appreciated!
Thanks.

 

Completed
Last Updated: 24 Sep 2020 09:44 by ADMIN
Release 2.18.0

Reproducible:

 

1. Run the snippet below
2. click the grid
3. press Down until you reach the last row, then press Down again

 

<TelerikGrid Navigable="true" Pageable="false"
             Data=@GridData Height="400px" >
    <GridColumns>
        <GridColumn Field=@nameof(Employee.Name) />
        <GridColumn Field=@nameof(Employee.Team) Title="Team" />
    </GridColumns>
</TelerikGrid>

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

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

    public class Employee
    {
        public int EmployeeId { get; set; }
        public string Name { get; set; }
        public string Team { get; set; }
    }
}
Completed
Last Updated: 10 Jan 2023 12:13 by ADMIN
Release 4.0.0 (18 Jan 2023) (R1 2023)

The Custom Filter Menu in the Grid is not working as I would expect.

 

I am trying to do two things

  1. Apply filters programmatically through the Grid State
  2. Populate a custom Filter Menu with values that exist in that column

I am doing something very similar to the demo for the custom filter menu: https://demos.telerik.com/blazor-ui/grid/custom-filter-menu

I have observed that if I set a filter programatically through the grid state, those filters are applied to the grid but are not being passed through the FilterMenuTemplateContext object in the FilterMenuTemplate when I open the Filter Menu for that column.  Therefore, I cannot update my custom filter to show which values are currently being filtered on.

Is it by design that the FilterMenuTemplateContext does not contain Filters applied through the grid state or a bug?

---

ADMIN EDIT

As of Dec 2020, there is one outstanding issue - using complex filters (having a CompositeFilterDescriptor) for the FilterRow filter template gets saved in the grid state, but is not loaded as expected - the filter row uses a "regular" FilterDescriptor and cuts off additional descriptors. Thus, the context of the template does not provide all the data from the grid state and you need to extract it manually. I have attached a sample that shows one way of doing that in the StateInit handler.

The FilterMenu already provides all the data in its context and you can bind inputs in the template directly to the filter descriptors. Once the filter row can work with more complex filter descriptors as well, you would be able to create the extra descriptors (if they are not already there) and directly bind the inputs to their value, as opposed to the current approach where view-model fields are used.

---

Completed
Last Updated: 12 Mar 2024 09:26 by ADMIN
Release 2024 Q2 (May)

---

ADMIN EDIT

Attached to this post are a reproducible and a workaround - setting the state in OnAfterRenderAsync with a small delay, so the initial grid render happens, then it can re-render and take the filters into account.

---

Completed
Last Updated: 14 Apr 2020 15:15 by ADMIN
Release 2.11.0
Created by: Heiko
Comments: 3
Category: Grid
Type: Feature Request
8
It would be nice if the title of a column is fetched from Display(...) or DisplayName(...) attribute of field.
Completed
Last Updated: 14 Jan 2022 12:00 by ADMIN
Release 3.0.0

Here is the scenario:

  • UI for Blazor version 2.30
  • Grid with InCell editing
  • EditorTemplate with a DropDownList inside

In version 2.30 there is no longer need for an explicit blur handler for the in-cell editor template. The editor template closes automatically when the user selects a value from the DropDownList. However, the new value is ignored.

REPL test page: https://blazorrepl.telerik.com/mFbcmQvs16Lf1jwv18

Completed
Last Updated: 17 Feb 2022 14:19 by ADMIN
Created by: Armineh
Comments: 5
Category: Grid
Type: Feature Request
8
I want to reduce length of pagination selection below the grid  ( currently is showing as   << 1  2 3 4 5 6 7 8 9 10 ...>>     but I want to have it like << 1 2 3 ....>>)
Completed
Last Updated: 27 Apr 2022 13:04 by ADMIN
Release 3.3.0
I am using a bool property to control whether the rows of the Grid would be draggable. When I try to toggle the value of this property the feature is not enabled or disabled accordingly. 
Completed
Last Updated: 09 Sep 2020 08:28 by ADMIN
Release 2.17.0

The issue can be reproduced using the Filter From Code -> FilterMenu code snippet provided here:
https://docs.telerik.com/blazor-ui/components/grid/filtering#filter-from-code

 

Completed
Last Updated: 05 Aug 2020 07:26 by ADMIN
Release 2.16.0
Created by: Gary
Comments: 3
Category: Grid
Type: Feature Request
8

I am editing parent and child records in the hierarchy grid.  I can edit parent and child records without issue.  The only problem I have now is this; when I click edit on a child record, then collapse the parent, the edit of the child record is lost or cancelled but there is no event I can see to use to put things back in non-edit mode.

I enable buttons and links in non-edit (view) mode and disable them when editing a record.

So,  is there an event or some way to know the user is collapsing or expanding a parent record?

 

Thank you,

Completed
Last Updated: 08 Jul 2020 09:23 by ADMIN
Release 2.16.0
Created by: Maurice
Comments: 1
Category: Grid
Type: Bug Report
8
At the moment I get an empty grid when I group
Completed
Last Updated: 18 Oct 2019 15:37 by ADMIN
Release 2.2.0
Created by: Dan
Comments: 0
Category: Grid
Type: Feature Request
8
Allow end users to drag the columns into an order of their choosing
Completed
Last Updated: 19 Oct 2021 08:16 by ADMIN
Release 2.28.0
Created by: Oliver
Comments: 0
Category: Grid
Type: Bug Report
8

When I switch the culture of my App from English to Swedish, the Virtual scrolling feature of the Grid breaks. 

===========

ADMIN EDIT

===========

The issue stems from invalid transform style applied to the k-virtual-position div element in Swedish culture. Due to integer to string conversion that takes culture into consideration when setting the style and/or data-translate attribute, when this number is < 0, the negative sign is longer dash for Swedish culture. This longer dash is not parsable by JS and CSS which is why the translateY transform is invalid.

As a workaround for the time being, you can try adding transform style for the k-virtual-position div, so you can override the default one and the correct dash will be applied: 

<style>
    .k-virtual-position {
        transform: translateY(-1080px);
    }
</style>

 

 

 

Completed
Last Updated: 29 Apr 2020 16:05 by ADMIN
Release 2.11.0

I want to fetch grid records page per page according to the appropriate filter settings. While this is possible through the OnRead event, I want to be able to send the request to the server so that it is easier to fetch the data, like in the UI for ASP.NET Core grid. Currently you can do this only for a server-side project because you can pass the request object by reference, but for a WASM project it needs to serialize in an HTTP request.

---

ADMIN EDIT

You can find examples of doing this here: https://github.com/telerik/blazor-ui/tree/master/grid/datasourcerequest-on-server

---