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.

 

Duplicated
Last Updated: 14 Jan 2022 10:00 by ADMIN
Created by: Ali
Comments: 4
Category: Grid
Type: Feature Request
11

Hi

I have a question regarding the telerik grid component particularly the hierarchy. Is it possible to open a hierarchy programmatically? For example:

I have my grid with information. Every row have more information to show. Those are stored in a hierarchy level to this row. Can I, instead of clicking the '+'-button in the row, just open it with with a method that i call e.g. in another button?

I want to make the rows clickable, i saw in the forum that this isn't yet supported for the grid. Now, I'm placing a div-Tag in the DetailTemplate of this row, and give that div a onclick-Attribute. The method the div invokes, should open the row for me respectively show the hierarchy of this row.

Is this possible?

thanks for your support.

regards

Ali Shala

Completed
Last Updated: 17 May 2024 13:11 by ADMIN
Release 2024 Q2 (May)
Subject says it all.  Would like the ability to selectively enable/disable a single checkbox in a checkbox column.
Completed
Last Updated: 27 Mar 2020 09:26 by ADMIN
Created by: René
Comments: 4
Category: Grid
Type: Feature Request
24
This is needed to be able to create quick filter buttons or a custom search panel.
Completed
Last Updated: 17 Sep 2020 08:40 by ADMIN
Release 2.17.0
Created by: René
Comments: 6
Category: Grid
Type: Feature Request
11
Please add a Search Panel to the Blazor Grid.  Behaviour should be the same as the Search Panel in the Grid for .NET Core.
Completed
Last Updated: 30 Oct 2019 14:56 by ADMIN
Release 2.3.0
Put the snippet in the index page

Expected: the grid has data

Actual: the grid has no data, it shows up after a data source operation like filter/group

Sample:

@using ClientApp.Shared
@inject HttpClient Http

<TelerikGrid Data=@forecasts Height="550px"
                Pageable="true" Sortable="true"
                PageSize="20" Groupable="true">
    <GridColumns>
        <GridColumn Field="Date">
            <Template>
                @((context as WeatherForecast).Date.ToString("dddd, dd MMM yyyy"))
            </Template>
        </GridColumn>
        <GridColumn Field="TemperatureC" Title="Temp. C" />
        <GridColumn Field="TemperatureF" Title="Temp. F" />
        <GridColumn Field="Summary" />
    </GridColumns>
</TelerikGrid>

@code {

    //List<WeatherForecast> forecasts { get; set; } = new List<WeatherForecast>(); // Works fine!


    List<WeatherForecast> forecasts { get; set; } //Need to sort a field to show the rows

    protected override async Task OnInitializedAsync()
    {
        //forecasts = new List<WeatherForecast>(); //this helps

        forecasts = await Http.GetJsonAsync<List<WeatherForecast>>("WeatherForecast");

        //these do not help
        //await Task.Delay(200);
        //StateHasChanged();
    }
}

Declined
Last Updated: 29 Apr 2020 14:02 by ADMIN

 

@GridEditMode.Incell mode does not update automatically on row change when an editortemplate is used, as below

            <GridColumn Field=@nameof(ProjectRankingInfo.Ranking.Option2) Title="@Option2Title" Width="120px" Filterable="false">
                <EditorTemplate>
                    @{
                        currentItem = context as ProjectRankingInfo.Ranking;
                        <TelerikNumericTextBox Max="10" Min="0" Step="1" @bind-Value=@currentItem.Option2 />
                    }
                </EditorTemplate>
            </GridColumn>

 

one must click the update button for the update to occur,

 

Incell works fine and updates on row change for simple grid columns

ADMIN EDIT: SOLUTION: Read the details in the following article: https://docs.telerik.com/blazor-ui/components/grid/editing/incell#notes

ADMIN EDIT: this thread is rather long and I am adding the workaround offered by René here:

<TelerikGrid Data="@GridData" OnUpdate="@UpdateHandler"> ... </TelerikGrid>

 

In GridColumn
-------------------

<EditorTemplate>
   @{
         var item = context as MyModel;
         EditedItem = item;
         <TelerikNumericTextBox @bind-Value="@item.Number" OnChange="OnChangeItemHandler">
         </Telerik.Blazor.Components.TelerikNumericTextBox>
      }
</EditorTemplate>

 

In Code-Section
----------------------

protected MyModel EditedItem { get; set; }

protected void OnChangeItemHandler()
{
       var gridCommandEventArgs = new GridCommandEventArgs
       {
            Item = EditedItem
       };

        UpdateHandler(gridCommandEventArgs);
}

protected void UpdateHandler(GridCommandEventArgs args)
{
       var myModel = (MyModel)args.Item;

      // Save myModel to DB

      .....

}
Duplicated
Last Updated: 02 Mar 2020 12:53 by ADMIN
Created by: Deepa
Comments: 3
Category: Grid
Type: Feature Request
2

Hi there, 

Is it possible to have multi-column headers for the data grid, like we have in Kendo grid. 

if so, what would be the ETA? 

Thanks,

Deepa

Unplanned
Last Updated: 31 Aug 2020 09:20 by ADMIN
Created by: Datafyer
Comments: 2
Category: Grid
Type: Feature Request
9

Would be helpful to have the feature of copying selected row to the clipboard.

The copy format could be CSV or just tabbed delimiter.

---

ADMIN EDIT

In the meantime, you can consider your own JS-based solution (example StackOverflow thread) and integrate them on a command button in the grid or in the row context menu.

---

Completed
Last Updated: 19 Feb 2020 11:12 by ADMIN
Release 2.8.0
Created by: Robert
Comments: 3
Category: Grid
Type: Bug Report
7

I have a simple Grid with custom detail template

    <Telerik.Blazor.Components.TelerikGrid Data="@GridData" FilterMode="Telerik.Blazor.GridFilterMode.FilterRow" >

        <GridColumns>
            <Telerik.Blazor.Components.GridCheckboxColumn Title="Selected"></Telerik.Blazor.Components.GridCheckboxColumn>
            <Telerik.Blazor.Components.GridColumn Title="Name" Filterable="true" Field="@nameof(GridItem.Text)"></Telerik.Blazor.Components.GridColumn>
            <Telerik.Blazor.Components.GridColumn Field="@nameof(GridItem.Date)" Filterable="true" Title="Date"></Telerik.Blazor.Components.GridColumn>
            <Telerik.Blazor.Components.GridColumn Field="@nameof(GridItem.Id)" Filterable="true" Title="Id"></Telerik.Blazor.Components.GridColumn>
            <Telerik.Blazor.Components.GridColumn Field="@nameof(GridItem.ParentIdValue)" Filterable="true" Title="Parent Id"></Telerik.Blazor.Components.GridColumn>
            <Telerik.Blazor.Components.GridColumn Field="@nameof(GridItem.HasChildren)" Filterable="true" Title="Has Children"></Telerik.Blazor.Components.GridColumn>
        </GridColumns>

        <DetailTemplate>
            <div>Custom Template</div>
        </DetailTemplate>

    </Telerik.Blazor.Components.TelerikGrid>

 

And here is what it looks like. Filters are moved one column to the left. When I remove DetailTemplate everything is ok.

 

Completed
Last Updated: 27 Aug 2020 09:12 by ADMIN
Release 2.17.0

When a column is displayed conditionally, it's order is not preserved. In the code sample below, the ProductId column is the first column in the grid.  When you click the checkbox to hide the column, it is removed.  Click the checkbox again and the column reappears but it is the last column in the grid.

ADMIN EDIT: At the end of this post there is an attachment with a workaround through a custom column chooser.

<input type="checkbox" @onchange="@ToggleColumn" />

<TelerikGrid Data=@GridData>
    <GridColumns>
        @if (ShowColumn)
        {
            <GridColumn Field=@nameof(Product.ProductId) Title="Id" />
        }
        <GridColumn Field=@nameof(Product.ProductName) Title="Product Name" />
        <GridColumn Field=@nameof(Product.UnitPrice) Title="Unit Price">
            <Template>
                @(String.Format("{0:C2}", (context as Product).UnitPrice))
            </Template>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

@code {
    public IEnumerable<Product> GridData { get; set; }
    bool ShowColumn = true;

    protected override void OnInitialized()
    {
        List<Product> products = new List<Product>();
        for (int i = 0; i < 20; i++)
        {
            products.Add(new Product()
            {
                ProductId = i,
                ProductName = "Product" + i.ToString(),
                UnitPrice = (decimal)(i * 3.14)
            });
        }

        GridData = products.AsQueryable();
    }

    private void ToggleColumn(ChangeEventArgs args)
    {
        ShowColumn = (bool)args.Value;
    }

    public class Product
    {
        public int ProductId { get; set; }
        public string ProductName { get; set; }
        public decimal UnitPrice { get; set; }
    }
}

Completed
Last Updated: 18 Mar 2021 09:09 by ADMIN
Release 2.23.0
Created by: Sylvain
Comments: 4
Category: Grid
Type: Feature Request
27

Hi !

How can i hide some columns on small device ?

Telerik.Blazor.Components.GridColumn.Class does not exist ?

Regards,

 

--------

ADMIN EDIT

This will be done through the Visible parameter of the column. You can bind it to a flag that hides the column for the desired scenarios (resolution, user settings, etc.). The new feature we provide to facilitate this will be a MediaQuery component that lets you have an easy flag in the C# code based on the media query for the desired resolution. There will be a demo how to use it with the grid columns when the 2.23.0 release is live. With this approach you will still use a CSS media query, but this will give you more flexibility to use it in more functionality than just the grid columns, and will avoid adding extra properties to the column.

--------

Completed
Last Updated: 09 Dec 2019 15:12 by ADMIN
Created by: Andriy
Comments: 2
Category: Grid
Type: Feature Request
3
Hi, Marin
I want to localize caption in right-bottom corner where pager wrote record number and total values.
How I can do this?
Thank you.
Completed
Last Updated: 19 Jan 2021 12:46 by ADMIN
Release 2.21.0
Created by: David
Comments: 4
Category: Grid
Type: Feature Request
16
We use the multi-checkbox filters in our jquery grids now and would like to use them in Blazor. Example here https://demos.telerik.com/kendo-ui/grid/filter-multi-checkboxes
Completed
Last Updated: 20 Nov 2020 11:49 by ADMIN
Release 2.20.0
Created by: Ryan
Comments: 2
Category: Grid
Type: Feature Request
28
Please add a feature to export the grid to a CSV file.
Unplanned
Last Updated: 19 Jan 2024 10:54 by ADMIN
Created by: Ryan
Comments: 10
Category: Grid
Type: Feature Request
90

Please add a feature to export the grid to a PDF file.

---

ADMIN EDIT

We have made two examples you can use for the time being to get a PDF document from the grid:

---

Completed
Last Updated: 14 Apr 2020 15:40 by ADMIN
Release 2.11.0
Created by: Gordon
Comments: 2
Category: Grid
Type: Feature Request
5

Is there any way to default the values that are used when I create a new row?

So for example, I have a row where I want to default a date to Jan 1st of the following year.  However, when I add the row, it adds nulls to all fields and the date shows up as 1 Jan 1900 and there's a lot of fiddly clicking to set the right date.

Unplanned
Last Updated: 04 Oct 2019 06:20 by ADMIN
Created by: Manu
Comments: 0
Category: Grid
Type: Feature Request
5
I want my users to not be able to change grouping - I want to define it in code without them being able to drag headers around. I also need to customize the templates for the group headers and to be able to hide the icons for collapsing a group.
Completed
Last Updated: 13 Dec 2021 07:57 by Ironoak
Release 2.9.0
Created by: Michael
Comments: 10
Category: Grid
Type: Feature Request
26
At this point only the user can group the grid. I want to be able to set initial grouping with my code. This should also allow me to group by columns that are not visible/rendered at the moment.
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.