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).
After the update I get the following error message:
/...Views/ViewRoute.razor(13,13): Error CS0012: The type 'SortDescriptor'is defined in an assembly that isnot referenced. You must add a reference to assembly 'Telerik.DataSource, Version=2.0.10.0, Culture=neutral, PublicKeyToken=29ac1a93ec063d92'. (CS0012)
the package is installed...nevertheless I get the error
<PackageReference Include="Telerik.UI.for.Blazor" Version="2.26.0" />
<PackageReference Include="Telerik.DataSource" Version="2.0.10" />
at this position
GridState<Wegpunkte> desiredState = new GridState<Wegpunkte>()
{
SortDescriptors = new List<SortDescriptor>()
{
new SortDescriptor {Member = "TourPos", SortDirection = ListSortDirection.Ascending}
}
};
Here is the scenario and how to reproduce the issue:
Hi,
I am getting an unhandled exception when setting the GridState of a TelerikGrid with the SetState method that has multi-column headers.
Exception:
Unhandled exception rendering component: More than one sibling of element 'col' has the same key value, 'Telerik.Blazor.Components.GridColumn'. Key values must be unique.
Example grid:
<TelerikGrid @ref=@TestGrid Data=@TestData FilterMode=GridFilterMode.FilterMenu Sortable="true" SortMode=SortMode.Multiple TItem="TestDataItem">
<GridColumns>
<GridColumn Title="Test Column 1" Field=@nameof(TestDataItem.TestColumn1) />
<GridColumn Title="Test Column Group" />
<Columns>
<GridColumn Title="Test Column 2" Field=@nameof(TestDataItem.TestColumn2) />
<GridColumn Title="Test Column 3" Field=@nameof(TestDataItem.TestColumn3) />
</Columns>
</GridColumn>
</GridColumns>
<TelerikGrid>
I have tried to set the Id or @key of the columns but nothing has fixed this issue.
For example in the following demo:
https://demos.telerik.com/blazor-ui/grid/custom-filter-menu
If I first filter "38" by "Size" and then open the second filter menu "Product Name", I see all the product names in the pop-up, not only the previously filtered by "Size" names. I want to see in the second filter pop-up only the filtered names by "Size".
It will be nice to have this grid filter out-of-box, so you don't have to scroll to unwanted values not part of the first filter.
------------ADMIN EDIT-------------
As a possible workaround, you can use the Filter Menu Template:
It allows you to change the data for the filter menu.
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.
Can you add a confirmation popup to the grid row delete like what is in the JQuery UI library?
---
ADMIN EDIT
As of 2.23.0 predefined confirmation dialog is available for use with just a few lines of code and you can achieve that behavior through the OnClick event of the command button:
<TelerikGrid Data=@GridData EditMode="@GridEditMode.Inline"
Height="500px" AutoGenerateColumns="true" Pageable="true"
OnDelete="@DeleteItem">
<GridColumns>
<GridAutoGeneratedColumns />
<GridCommandColumn Width="100px">
<GridCommandButton Command="Delete" Icon="delete" OnClick="@ConfirmDelete">Delete</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
@code {
//for the confirmation - see the OnClick handler on the Delete button
[CascadingParameter]
public DialogFactory Dialogs { get; set; }
async Task ConfirmDelete(GridCommandEventArgs e)
{
Product productToDelete = e.Item as Product;
string confirmText = $"Are you sure you want to delete {productToDelete.Name}?";
string confirmTitle = "Confirm Deletion!";
//the actual confirmation itself
bool userConfirmedDeletion = await Dialogs.ConfirmAsync(confirmText, confirmTitle);
e.IsCancelled = !userConfirmedDeletion;//cancel the event if the user did not confirm
}
// only sample data operations follow
public List<Product> GridData { get; set; }
protected override async Task OnInitializedAsync()
{
GridData = Enumerable.Range(1, 50).Select(x => new Product { Id = x, Name = $"Name {x}" }).ToList();
}
private void DeleteItem(GridCommandEventArgs args)
{
Console.WriteLine("DELETING ITEM");
var argsItem = args.Item as Product;
GridData.Remove(argsItem);
}
public class Product
{
public int Id { get; set; }
public string Name { get; set; }
}
}
---
Typo:
<span>Produts for sale: @productsCount </span>
Should be Products
If you reorder a column and then lock it, visually it looks locked and the functionality for a locked column is correctly supported.
However, the Locked property of the ColumnStates in Grid State for that column remains "false". Locked = "true" is applied based on the initial column position.
I want to use a multi-checkbox filter with ExpandoObject in Grid.