Hello,
I have a grid filterable with one column with FilterMenuType.CheckBoxList.
I initialize a defaut filter with OnStateInit which work fine. But when I change the filter by selecting "Select all", nothing is return. It only work when I clear the filter first.
I reproduce the issue here : https://blazorrepl.telerik.com/GokJaiFR56kNGYBW07
Am I doing something wrong with the default filter or is it a bug? I can't find anything related.
Thanks in advance
Hello,
i do have a Grid column in the Grid and i want to enter a date range filter in the filter row.
how can i implement this?
best regards
Volkhard
Hello,
i want to change the color of a header cell text when the user enters some filter criteria for this column in the filter row.
can you help me? How can i implement this?
best regards
Volkhard
When using a detail template on a grid control, the user must click twice to expand the detail section after filtering.
Executable: https://blazorrepl.telerik.com/QyummElT43XLHu3R42
Steps to reproduce:
1) Load Page
2) Make a selection from the category drop down filter
3) Attempt to expand the detail section of any record by clicking on the "+"
@page "/"
@using Telerik.DataSource
<TelerikGrid TItem="@Person"
OnRead="@LoadGrid"
SelectionMode="GridSelectionMode.Single"
FilterMode="GridFilterMode.FilterRow"
FilterRowDebounceDelay="200"
Pageable="true"
PageSize="15"><DetailTemplate>
@{
var selected = context as Person;
}
<div class="row">
<div class="col-2">
<h1>@selected.First</h1>
</div>
<div class="col-2">
<h1>@selected.Last</h1>
</div>
</div>
</DetailTemplate>
<GridColumns>
<GridColumn Field="@nameof(Person.First)" Title="First" Filterable="false"></GridColumn>
<GridColumn Field="@nameof(Person.Last)" Title="Last" Filterable="false"></GridColumn>
<GridColumn Field="@nameof(Person.Category)" Title="Category">
<FilterCellTemplate>
@{
CategoryFilter = context;
}
<TelerikDropDownList
Data="Categories"
@bind-Value="SelectedCategory"
OnChange="SetupCategoryFilter">
</TelerikDropDownList>
</FilterCellTemplate>
</GridColumn>
</GridColumns>
</TelerikGrid>
@code
{
private FilterCellTemplateContext CategoryFilter { get; set; } = new();
private List<int> Categories = [0, 1, 2, 3, 4];
private int SelectedCategory { get; set; }
private async Task SetupCategoryFilter()
{
var filter = CategoryFilter.FilterDescriptor.FilterDescriptors[0] as FilterDescriptor;
if (filter is null)
{
return;
}
filter.Value = SelectedCategory;
filter.Operator = FilterOperator.IsEqualTo;
await CategoryFilter.FilterAsync();
}
protected void LoadGrid(GridReadEventArgs args)
{
List<Person> list =
[
new Person {First = "John", Last = "Doe", Category = 1},
new Person {First = "Jane", Last = "Doe", Category = 2},
new Person {First = "John", Last = "Smith", Category = 3},
new Person {First = "Jane", Last = "Smith", Category = 4}
];
args.Data = list;
args.Total = list.Count;
}
public class Person
{
public string First { get; set; }
public string Last { get; set; }
public int Category { get; set; }
}}
When i tried to bound Grid to a ExpandoObject or DataTable I can't use filter properties .It throws unhandling Exception error. How to sort out this issue.
I am using a Telerik DataGrid in Blazor to display entity data. In this grid, one column's Field represents a one-many data relationship. The Field type is an int, however in this column we use both a <Template> and a <EditorTemplate> to display string values associated with the backing Ints, which serves as an ID for this data. This string data is not stored in this application, but rather retrieved via a webAPI from another application that manages it.
Is it possible to filter the column based on how the data is rendered in the display Template, which is a string? At present, any filtering at all Below is the code for the data grid. The column on which we would like to filter based on the string rendered in the template is bolded:
<TelerikGrid Data="@BranchList"I have a Blazor Server app using TelerikGrid. The grid has lots of columns and I have FilterMode set to FilterRow and the default filtering works great. However, since the grid is also set to ScrollMode Virtual, there is no immediate indication of how well the filter is defined. To fix this I want to display the number of records that are actually "filtered in" in comparison to the total number of records possible so that the user can tell if they've (for example) selected nearly all the records.
I've looked everywhere and I cannot find a way to ask the grid how many records are currently filtered in.
It seems like I could take the FilterDescriptors, convert them to SQL for a where clause, and run the query every time they change the filter, but that seems like such a waste to essentially run the filter twice every time it reloads. Even though my dataset is currently small enough that I cache the whole thing on the server, I'm still doing twice the work to get to a number the grid must know.
Here is a snippet from my Razor file:@code {
privateint _filteredCount = 0; // How to set this?
}
<TelerikGrid Data="@_applications"
Pageable="false"
Sortable="true"
Resizable="true"
FilterMode="@GridFilterMode.FilterRow"
Width="100%"
ScrollMode="@GridScrollMode.Virtual"
OnStateInit="(GridStateEventArgs<ApplicationListDTO> args) => StateInitHandler(args)"
OnStateChanged="(GridStateEventArgs<ApplicationListDTO> args) => StateChangedHandler(args)"
Height="540px" RowHeight="60">
<GridColumns>
Column definitions left outfor brevity
</GridColumns>
</TelerikGrid>
<div class="applicationCount">@(_applications.Count()) applications found, @_filteredCount listed</div>
Suggestions?
I only want my users to be able to add one level of groups to their filters.
For example:
Color = blue
AND
(
height > 3
OR
height < 1
)
OR
foo = bar
I don't want them to add sub-groups to groups (adding an AND group inside of the height block in the above). Is there a way to prevent that from happening in the control?