Hello,
When I add the tag Filterable="true" to my DropDownList I get the following exception when I try to click on the dropdown:
" Could not find 'TelerikBlazor.initDropDownListFilter' ('initDropDownListFilter' was undefined)."
The project build without a problem but the error occurs when I click the dropdown. Am I missing a using statement or what could be the problem?
Hello!
It is possible to hide or reduce width for grid's hierarchy cells?
On mobile devices, this place is very valuable and is not used effectively.
var result = await dialog.Show().Result;
bool isVisible, dialogResult;
CancellationTokenSource tokenSource;
public async Task<bool> Show() {
isVisible = true;
await InvokeAsync(StateHasChanged);
return await Task.Run(WaitForResult); }
// Waiting for action
private async Task<bool> WaitForResult() {
tokenSource = new();
while (!tokenSource.Token.IsCancellationRequested) ;
isVisible = false;
await InvokeAsync(StateHasChanged);
return dialogResult; }
private async void Submit(bool result) {
dialogResult = result;
tokenSource.Cancel(); }
The Telerik Blazor Grid documentation on column widths mentions that:
To allow the users to auto-fit the column widths to the content, enable column resizing - a double click on the border between the headers will have the grid adjust the column width according to the size of the data, headers and footers content.
Is it possible to generate the grid so that all the columns are set to auto-fit the data by default, rather than it being something that the user has to trigger themselves?
I have a Telerik Blazor Grid where I have implemented a custom FilterMenuTemplate which is used on 12 of the columns in the grid.
The custom FilterMenuTemplate displays a checkbox for all the distinct values in the database for that column field.
It takes approximately 2-3 seconds for the data to be returned from the database, and this is for each column.
When I first implemented the custom FilterMenuTemplate I only added it to a single column and it worked fine. Since adding it to all 12 columns I have experienced a null reference exception. The exception happens when the data hasn't finished being returned from the database and the collection Data property in the custom FilterMenuTemplate is null.
I added a null check like so to stop the null reference exception from being thrown, instead displaying a message to the user that the data is loading...:
<div class="filter-values-container">
@if (Data == null)
{
<p>Loading filter values...</p>
}
else
{
foreach (var item in Data)
{
<div>
<TelerikCheckBox Value="@(CurrentDistinctValueFilters.Contains(item.Key.ToString()))"
ValueChanged="@((bool value) => CheckBoxValueChanged(value, item.Key.ToString()))"
Id="@($"{Field}_{item.Key}")"
Enabled="@EnableDistinctValues"/>
<label for="@($"{Field}_{item.Key}")" class="k-label k-form-label">
@item.Value
</label>
</div>
}
}
</div>
What I was hoping would happen is that once the user clicks on the column filter, that the filter popup would temporarily show the loading message and then dynamically update and remove the loading message instead show the checkboxes once the Data property had data from the database.
This doesn't appear to happen, instead the filter popup remains open and the loading message stays on screen. In order to get the filter popup to update with the checkboxes the user has to cancel the filter popup and re-active it to show the data.
Is there away of updating the filter popup dynamically once it is open and the data is available to render the checkboxes?
As a temporary crud workaround what I have none for now is disabled all the columns with these particular custom filters by binding the Filterable property on those columns to a boolean property which gets set to true when ALL the data for ALL 12 of those columns have been retrieved from the database.
e.g.
Filterable="@DataLoadedForGridFilters"
The downside to this is that none of those 12 column filters are enabled to be used for about 25+ seconds after the grid and then the associated column filter data have been retrieved from the database.
I need to return separate variables for the selected values (which will be used to query the data) and selected Text that will be use to populate a textbox on the page to show the user what they selected. I have a multiselect embedded within a Telerik Window so it pops-up, they select items and press the select button I have and the pop-up is hidden. it's returning the selected values but how do I also bind to the selected text?
Hi,
I have some measurement date in a database table:
...
public int Number { get; set; }
public DateTime Start { get; set; }
public long ElapsedTime { get; set; }
...
I want make a view similar in the attached image with expandable rows group by the date.
In the Viewmodel I add a property to get the Date from Start to support GROUP BY Date:
public IQueryable<MeasurementViewModel> GetMeasurements()
{
var result = _context.Measurement.Select(w => new MeasurementViewModel
{
Date = w.Start.Date,
Start = w.Start,
Number = w.Number,
ElapsedTime = w.ElapsedTime,
}); ;
return result;
}
What is better to use: Grid with Grouping and aggregat or TreeList?
For TreeList I dont have parentID and childID. I think it is possible to calculate it.
The standard Grid group example doesn't work: if I drag the Date column to the header only the waiting spinner is shown.
A solution for the grid should be: without Text "Drag a column header..." and not changeable by user.
The expandable date-header-rows sould show some aggregates per day: Count() and SUM(ElapsedTime).
Is that possible?
Best regards,
Peter
Does the GridReadEventArgs support some sort of in functionality?
I am trying to programmatically use several multiselect lists to create the initial query for loading data into a grid via an OData datasource.
The "query" created is close but the fieldname is surrounded by single quotes so the query does not work
This is what is created
filter=(contains('abc,DEF','MyColName'))
but this is the proper syntax
filter=(contains('abc,DEF', MyColName))
Is there anyway short of manipulating the resulting query string to remove the single quotes from around 'MyColName'?
Or IsContainedIn now supported in the latest version of the Blazor UI library?
When you enable filtering on grid columns the default out of the box implementation gives you 2 textboxes with an "AND" operator between the 2 textboxes. For numeric columns a dropdown with options like "is less than or equal to", "is greater than or equal to" etc is displayed. For string columns a dropdown with "contains" etc is displayed.
I would like to utilise the default filter implementation as described above but with the addition of my own custom checkbox filter above that will render all possible distinct values from the database.
Is there a Telerik component (similar to the TelerikCheckBoxListFilter component) that I can add to my custom FilterMenuTemplate component that will bring back the default out of the box filter UI for numbers and strings or if I'm implementing my own custom FilterMenuTemplate do I also have to manually re-create these standard filters?