Unplanned
Last Updated: 25 Apr 2023 06:05 by ADMIN

Hello,

I'm having issues trying to figure out how to change values (from the model) when I'm Incell Mode without triggers the OnRead events after.  The actual code is working great since I was able to remove the Incell mode on the OnChangeModel event below,  but OnRead is keeps call after (which I didn't need and slow user experience)

Is there a way to cancel the OnRead ?

 <TelerikGrid OnRead="ReadItems" EditMode="GridEditMode.Incell"
                     @ref="@GridRef">
    <GridColumns>
      <GridEditDropDownColumn Field="Test1" Data="@Eval?.ListEvaluationTypes" Title="Title" Width="130px" OnChange="OnChangeModel" />
    </GridColumns>
</TelerikGrid>

 

   private TelerikGrid<EvaluationListDTO> GridRef { get; set; }

   protected async Task OnChangeModel(object model)
        {
            var item = (EvaluationListDTO)model;

            var state = GridRef?.GetState();

           //Save in the Database  

                // use the state to remove the edited item (close the editor)
                state.EditItem = null;
                state.OriginalEditItem = null;
                await GridRef.SetStateAsync(state);
        }

Unplanned
Last Updated: 21 Oct 2022 11:33 by Jeff
Created by: Jeff
Comments: 0
Category: Grid
Type: Feature Request
4
I would like to refresh the contents of the FilterMenu from my application code. 
Unplanned
Last Updated: 08 Feb 2021 11:29 by ADMIN
I would like to use an event that fires after the SelectedItemsChanged and provide different async methods. 
Unplanned
Last Updated: 16 Nov 2022 11:53 by Rac
I have a Grid whos cumulative column width exceeds the total width of the Grid. I would like to reorder a column outside of the current Grid viewport, but it is not currently available. 
Unplanned
Last Updated: 22 Jun 2023 10:40 by adam
Enhance the group header template context by including additional properties such as the parent group field and value.
Unplanned
Last Updated: 28 Jul 2023 13:56 by Patrik Madliak
Created by: Patrik Madliak
Comments: 0
Category: Grid
Type: Feature Request
4

Selection performance suffers if the Grid has a large page size and uses child components in column templates:

https://blazorrepl.telerik.com/QHaLcVbl25YrVZU821

This is because the Grid doesn't apply performance optimizations for templates and always re-renders them.

Please expose a setting to disable re-rendering if it's not necessary.

Unplanned
Last Updated: 14 Jun 2023 14:10 by Himani

I need to lock the "expand" column in the Grid(Locked=true).

When I scroll horizontally, the first column with the expand/collapse icon scrolls out of view. I would like a way to lock it.

Unplanned
Last Updated: 28 Sep 2021 11:03 by ADMIN
Created by: Jeffrey
Comments: 2
Category: Grid
Type: Feature Request
4

 

 

Grid - Import from Clipboard (Excel) when column name matches the first row header

 

I think it would be a great feature to be able to import copied data from excel into the grid either based on the index of the column or the header row in the clipboard matches the name of the column in Blazor Grid.

---

ADMIN EDIT

You can find an example of implementing this and the caveats it brings in the following sample project: https://github.com/telerik/blazor-ui/tree/master/grid/paste-from-excel

This feature requires research on how we could provide it as a built-in feature. So, any feedback on the matter will be appreciated.

---

Unplanned
Last Updated: 23 Mar 2022 12:23 by ADMIN
Created by: Nicolas
Comments: 2
Category: Grid
Type: Feature Request
4

Using OnRowDrop works fine but there is no configuration possible to set the column at the end of the grid.

Of course it's a personnal taste but I like to have the all the actions buttons on the right side

Unplanned
Last Updated: 27 Sep 2021 13:50 by ADMIN
Created by: Jeffrey
Comments: 0
Category: Grid
Type: Feature Request
4
I've got a large grid (many columns) and RowDraggable="true".  When I scroll horizontally, the first column with the grabber icon scrolls out of view.  I would like a way to lock it.
Unplanned
Last Updated: 04 Nov 2021 13:29 by ADMIN

Right now you can create a template in the grid to display text from a list based on the foreign key in the grid data. For example, if your database has a table user list and a table role. The Role table has an integer Id primary key column and a text Description column. The user table has a foreign key integer column that is the Role Id. You can bring all the data over when you call up the data (flattening the data) or you can just bring over the foreign key integer value for the role and then create templates.

The situation is described here:

https://docs.telerik.com/blazor-ui/knowledge-base/grids-foreign-key

When you do not flatten the data, you would need to retrieve the role collection and then reference that data in templates in the grid. You need a template for the grid itself, a template for filtering, and a template for the grouping. Maybe more that I am not finding?

What would be great is if you could simply set the foreign key collection for the column and not have to create any templates. You would have to also set what the Id and display text fields are on the collection also so the grid would know what data to use for finding and displaying the desired data. You could require a standard collection with standard field names and then we would have to project the values into it from our other collections using linq.

Unplanned
Last Updated: 19 Oct 2021 14:06 by Nemo

Hi, please expose a property in TelerikGrid where we can set the number of virtual columns to load in advance. A lot of times we would like to load data in advance for 5-10 columns left & right of the current viewport, so the user doesn't see empty columns while scrolling. This may apply to rows as well. It would be very helpful to have this property, please consider exposing it. Thank you.

============

ADMIN EDIT

============

The column Virtualization feature improves the Grid performance when it has a lot of columns. This does not include loading data on demand, but rather UI virtualization. All the data is retrieved and the performance optimization is achieved by rendering only the columns for the current Grid viewport. When the user scrolls horizontally the content for the other columns is rendered and while this happens, the cells appear empty. The requested parameter will control the number of columns that will be rendered in the current viewport but will not be visible until the user scrolls. Thus, the user will not see empty columns.

Unplanned
Last Updated: 18 Oct 2023 10:50 by Craig
Created by: Craig
Comments: 0
Category: Grid
Type: Feature Request
4

I would like to lock a column at a certain index in the Grid. For example, I would like to have a column on index 0 (the first column in the Grid) and it should not be reordered by any user interaction (dragging the column itself or dragging other columns in its place). 

Also if the user tries to drag a column over my locked column the drag handlers must not be present/or show that it is an invalid drop location.

===

Telerik edit:

In the meantime, a possible workaround is to:

  1. Handle the Grid OnStateChanged event.
  2. Check if args.PropertyName is equal to "ColumnStates".
  3. Check if the Index of the first Grid column (args.GridState.ColumnStates.First()) is greater than zero.
  4. Reset at least 2 column indexes, according to your preferences, so that the first column in the Grid markup is also the first column in the UI.
  5. Reset the Grid state with SetStateAsync().

 

<p>The <strong>Name</strong> column index will always be 0.
    The Grid will either move the reordered column to index 1, or put it back to its previous index (revert).</p>

<p><label><TelerikCheckBox @bind-Value="@ShouldRevertGridColumnOrder" /> Revert Invalid Column Reordering</label></p>

<TelerikGrid @ref="@GridRef"
             Data="@GridData"
             TItem="@SampleModel"
             Pageable="true"
             Sortable="true"
             Reorderable="true"
             OnStateChanged="@OnGridStateChanged">
    <GridColumns>
        <GridColumn Field="@nameof(SampleModel.Name)" Reorderable="false" />
        <GridColumn Field="@nameof(SampleModel.GroupName)" />
        <GridColumn Field="@nameof(SampleModel.Price)" />
        <GridColumn Field="@nameof(SampleModel.Quantity)" />
        <GridColumn Field="@nameof(SampleModel.StartDate)" />
        <GridColumn Field="@nameof(SampleModel.IsActive)" />
    </GridColumns>
</TelerikGrid>

@code {
    private TelerikGrid<SampleModel>? GridRef { get; set; }

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

    private bool ShouldRevertGridColumnOrder { get; set; }

    private IEnumerable<int>? CachedGridColumnIndexes { get; set; }

    private async Task OnGridStateChanged(GridStateEventArgs<SampleModel> args)
    {
        if (args.PropertyName == "ColumnStates")
        {
            if (args.GridState.ColumnStates.First().Index > 0 && GridRef != null)
            {
                if (ShouldRevertGridColumnOrder)
                {
                    await RevertGridColumnOrder();
                }
                else
                {
                    args.GridState.ColumnStates.First(x => x.Index == 0).Index = 1;

                    args.GridState.ColumnStates.First().Index = 0;

                    await GridRef.SetStateAsync(args.GridState);
                }
            }

            CacheGridColumnOrder();
        }
    }

    private void CacheGridColumnOrder()
    {
        var gridColumnState = GridRef?.GetState().ColumnStates;

        if (gridColumnState != null)
        {
            CachedGridColumnIndexes = gridColumnState.Select(x => x.Index);
        }
    }

    private async Task RevertGridColumnOrder()
    {
        var gridState = GridRef?.GetState();

        if (gridState != null && CachedGridColumnIndexes != null)
        {
            for (int i = 0; i < gridState.ColumnStates.Count; i++)
            {
                gridState.ColumnStates.ElementAt(i).Index = CachedGridColumnIndexes.ElementAt(i);
            }

            await GridRef!.SetStateAsync(gridState);
        }
    }

    protected override void OnAfterRender(bool firstRender)
    {
        if (firstRender)
        {
            CacheGridColumnOrder();
        }

        base.OnAfterRender(firstRender);
    }

    protected override void OnInitialized()
    {
        var rnd = new Random();

        for (int i = 1; i <= 7; i++)
        {
            GridData.Add(new SampleModel()
            {
                Id = i,
                Name = $"Name {i}",
                GroupName = $"Group {i % 3 + 1}",
                Price = rnd.Next(1, 100) * 1.23m,
                Quantity = rnd.Next(0, 1000),
                StartDate = DateTime.Now.AddDays(-rnd.Next(60, 1000)),
                IsActive = i % 4 > 0
            });
        }
    }

    public class SampleModel
    {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public string GroupName { get; set; } = string.Empty;
        public decimal Price { get; set; }
        public int Quantity { get; set; }
        public DateTime StartDate { get; set; }
        public bool IsActive { get; set; }
    }
}

 

Unplanned
Last Updated: 20 Apr 2022 09:58 by Cassaundra
Created by: Cassaundra
Comments: 0
Category: Grid
Type: Feature Request
4

I'd like for someone to be able to select all of the rows in a particular group. The main selection checkbox will just select all of the rows.

It would be nice if this also worked for sub grouping.

Unplanned
Last Updated: 21 Oct 2022 13:13 by ADMIN
Created by: Peter
Comments: 2
Category: Grid
Type: Feature Request
3

The `Context` of `<GridColumn>` is of type `object`, requiring typecasting in order to use the value.

Instead, make `<GridColumn>` generic so that `Context` is strongly typed.  If you use `TItem` as the name for the generic then Blazor will infer it without the user having to specify it.

 

Unplanned
Last Updated: 21 Apr 2023 13:29 by Víctor
Created by: Víctor
Comments: 0
Category: Grid
Type: Feature Request
3

===ADMIN EDIT===

Currently, we use groups for calculating all aggregates in Grid. We can optimize the process so that when there are no groups, specific aggregates are still calculated.

Unplanned
Last Updated: 12 Jul 2023 10:41 by Fabian

When I define a bigger number of MultiColumn Header the rendering performance of the Grid component quickly deteriorates. 

I would like an improvement in this regard.

Unplanned
Last Updated: 30 Nov 2022 13:47 by JeffVisibilEDI

I have applications for which I would like to define the default join operator for Grid filters to be "OR" instead of the default "AND."

Please expose an option to customize the default logical operator in Filter Menu.

Unplanned
Last Updated: 19 Feb 2024 08:51 by Manuel
Created by: Manuel
Comments: 0
Category: Grid
Type: Feature Request
3
Inside the <GridSettings> with <GridGroupableSettings Reorderable=true> to be able to Drag and Drop grouping reorder and not only with "Move Next" and "Move Previous".
Unplanned
Last Updated: 30 May 2023 09:57 by ADMIN

Currently, the empty cells in the exported Excel file contain zero-length strings. As a result, the ISBLANK() function returns false for them while the cells essentially do not have content.

Please allow the empty Grid cells to be treated as blank in the exported Excel file.

===

ADMIN EDIT

===

For the time being, you may extend the formula to also check whether the length of the cell content is 0. For that purpose, you may use the LEN() function as suggested here:  https://learn.microsoft.com/en-us/office/troubleshoot/excel/isblank-function-return-false#workaround.