Reordering rows with RowDraggable is great but tricky.
Droping while the red line marker is on the upper line of a row works.
Droping while the red line marker is on the bottom line of a row brings the item to the position over the dopped line.
Thus, it is impossible to bring a line to the last position of a table (although one can bring the last row over it's predecessor as a workaround)
In Grid with MultiColumnHeaders, if you programmatically change a column header, this breaks the Grid rendering. The header text isn't updated unless the number of child columns changes.
Reproduction steps:
1. Run the provided code snippet. It will bind August's data to the grid. There are 5 days in August's data, so you can see 5 child columns under "Sales by Date".
2. Click the July button. July's data also has 5 days. You will see all the cell texts are updated, but the header texts aren't.
3. If you click on the July button again. They are updated at this time.
4. Refresh the page
5. Click the June button. June's data has only 3 days, so you will see all the header texts, and the cell texts are updated as expected.
Reproduction code:
<TelerikButton OnClick="@Change0">August</TelerikButton>
<TelerikButton OnClick="@Change">July</TelerikButton>
<TelerikButton OnClick="@Change2">June</TelerikButton>
@if (AllSales.Count > 0)
{
<TelerikGrid @ref="@Grid" Data="@AllSales" Pageable="false">
<GridColumns>
<GridColumn Field="@nameof(MyViewModel.Product)">
</GridColumn>
<GridColumn>
<HeaderTemplate>
<div>Sales by Date</div>
</HeaderTemplate>
<Columns>
@{
var dates = AllSales.First().SalesByDate.Keys.OrderByDescending(d => d).ToList();
foreach (var date in dates)
{
<GridColumn Title="@date.ToString("MM/dd")">
<HeaderTemplate>
@{
Console.WriteLine(date.ToString("MM/dd"));
<div>@date.ToString("MM/dd")</div>
}
</HeaderTemplate>
<Template>
@{
var record = context as MyViewModel;
if (record.SalesByDate.ContainsKey(date))
{
<div>@record.SalesByDate[date]</div>
}
}
</Template>
</GridColumn>
}
}
</Columns>
</GridColumn>
</GridColumns>
</TelerikGrid>
}
@code {
public class MyViewModel
{
public string Product { get; set; }
public Dictionary<DateTime, decimal> SalesByDate { get; set; }
}
List<MyViewModel> AllSales { get; set; } = new List<MyViewModel>();
TelerikGrid<MyViewModel> Grid { get; set; }
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
Change0();
}
protected void Change0()
{
AllSales = new List<MyViewModel>();
AllSales.Add(new MyViewModel
{
Product = "Product A",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,08,01), 1000 },
{ new DateTime(2021,08,02), 2000 },
{ new DateTime(2021,08,03), 3000 },
{ new DateTime(2021,08,04), 4000 },
{ new DateTime(2021,08,05), 5000 }
}
});
AllSales.Add(new MyViewModel
{
Product = "Product B",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,08,01), 1000 },
{ new DateTime(2021,08,02), 2000 },
{ new DateTime(2021,08,03), 3000 },
{ new DateTime(2021,08,04), 4000 },
{ new DateTime(2021,08,05), 5000 }
}
});
}
protected void Change()
{
AllSales = new List<MyViewModel>();
AllSales.Add(new MyViewModel
{
Product = "Product C",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,07,01), 1010 },
{ new DateTime(2021,07,02), 2020 },
{ new DateTime(2021,07,03), 3030 },
{ new DateTime(2021,07,04), 4040 },
{ new DateTime(2021,07,05), 5050 }
}
});
AllSales.Add(new MyViewModel
{
Product = "Product D",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,07,01), 1010 },
{ new DateTime(2021,07,02), 2020 },
{ new DateTime(2021,07,03), 3030 },
{ new DateTime(2021,07,04), 4040 },
{ new DateTime(2021,07,05), 5050 }
}
});
}
protected void Change2()
{
AllSales = new List<MyViewModel>();
AllSales.Add(new MyViewModel
{
Product = "Product E",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,06,01), 1100 },
{ new DateTime(2021,06,02), 2200 },
{ new DateTime(2021,06,03), 3300 }
}
});
AllSales.Add(new MyViewModel
{
Product = "Product F",
SalesByDate = new Dictionary<DateTime, decimal>
{
{ new DateTime(2021,06,01), 1100 },
{ new DateTime(2021,06,02), 2200 },
{ new DateTime(2021,06,03), 3300 },
}
});
}
}
When exporting data from a Grid using ExcelExport, the dates are visible when viewed from Excel, but not when using Open Office or Google Sheets.

We are getting a problem with grid functionality after upgrading from 2.25 to 2.26. I have attached a test project. To see the problem:
We did not have this problem before version 2.26.
Just another note on this.
It appears that the presence of the checkbox columns causes the problem. Removing the checkbox columns causes the grid to work fine. Just having one checkbox template column in the grid causes the strange crash behavior in 2.26. Before 2.26, we had no problems with the checkbox templates impacting behavior.
It looks like the built-in validation does not respect clearing the edit item through state. If you remove invalid edit item through Grid State, the Grid stays in edit mode and the OnRowClick stops firing.
The case is similar when you try to clear an invalid InsertedItem through the Grid State - the Grid probably stays in Insert mode and some events are not firing (for example CUD events).
Hello,
After just a sort operation, in the event handler of OnStateChanged event, the FilterDescriptors of GridStateEventArgs.GridState is not empty.
Steps to reproduce :
1) Implement Grid with OnStateChanged and OnRead :
<TelerikGrid
OnStateChanged="@((GridStateEventArgs<IGetAgences_Agences_Items> args) => OnStateChangedHandler(args))"
OnRead=@ReadItems
async Task OnStateChangedHandler(GridStateEventArgs<IGetAgences_Agences_Items> args)
{
var filters = args.GridState.FilterDescriptors; // filters are not empty after just a sort opration
}
async Task ReadItems(GridReadEventArgs args)
{
this.LoadData()
await InvokeAsync(StateHasChanged);
}
2) Sort a column
3) The OnStateChanged event is fire
4) In the OnStateChangedHandler, the filters are not empty :
Expected behaviors :
If no filters added, the filters of the GridState must be empty
Thank's
Thomas
Hi,
Please lunch your demo on mobile, and try resizing a column it is very hard or impossible to do it.
Isn't possible to make resizing more pixel sensible around the separator for instance 10 pixels, and add AUTO FIT column/columns in column menu.
Best regards,
Hi,
Is it possible to use ENTER key to validate a popup filter ? instead of mouse.
Use a shortcut to open filter pop of focused column (cell). Ctrl+F or Ctrl+F3...
Yours,
Based on row values, I want to style the entire row.
It could perhaps be exposed through something like a "<RowDescriptor>" element inside the <GridColumns>
//ADMIN EDIT: We plan to extend this item so that it includes not only row styling, but also the ability to add CSS classes to the cells, without having to use the Template.
Hi,
Is it possible to add a sub menu, in column menu so that the end user can add an aggregate operation (Sum, average...) on any column he wants and the foot panel will be automatically displayed or hidden.
Yours,
<ColumnMenuTemplate>
<CustomColumnMenuItem/>
<ColumnMenuFiltering/>
<ColumnMenuSorting/>
....
</ColumnMenuTemplate>Currently, when you open a ColumnMenu, to expand its SubMenus (for example, Filter, Column chooser) you need to additionally click on the corresponding button.
I'd like to have these SubMenus initially expanded when the ColumnMenu is opened.
If a Grid column is bound to a nullable bool field and some of the data source records have null values for that field they are not displayed, the Grid cells appear empty.
It would be nice if the Grid displays some text for the null values, for example just "null".
There should be a way to provide the Format for filtering of DateTime columns.
If a DateTime column has the format "dd.MM.yyyy" filtering for "EQUALS 01.01.2021" does not show lines with the timestamp "01.01.2021 01:00" but the user would expect to see this line.
Regards,
René
Irrespective of the grid 'grouping' technique (manual or via AutoStateInit), the <NoDataTemplate> is not displaying correctly.
All other grids that are not using Grouped columns all format correctly (when no results available).