GridCheckBoxColumn: The check disappears when focus is on a editable cell.
<TelerikGrid Class=k-grid
I'd like to be able to enable the Column Chooser menu on just the Command Column and then keep all the other column menus as-is (I have a combination of various custom filter controls on them, so I don't watch to switch to the Column Menu)
When storing and restoring grid state, the selected page size is not included as part of that state currently, and needs to be stored seperately.
(When using GridPagerSettings, the user can select the page size based on inputs provided to PageSizes param. This selection is not synced and will revert to default each time the grid is loaded.
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.
Hi, please expose the debounce delay as a property of TelerikGrid so we can set how soon virtualized columns are loaded after the user scrolls.
**Admin Edit**
This feature request requires research, and if such DebounceDelay parameter can work with good quality in all cases - it will be implemented. Additionally, we will revise the feature together with loading next set of columns if it will be applicable.
**Admin Edit**
I suggest adding a FieldExpression property to the GridColumn so a developer would not need to create view models and templates for simple transformations of the existing model's properties. The field expression would be used for filtering and sorting as well. Its type would be Func<T, object> or Expression<Func<T, object>>.
<TelerikGrid Data="@Persons">
<GridColumns>
<GridColumn FieldExpression="@(p => p.FirstName + " " + p.LastName)" />
</GridColumns>
</TelerikGrid>
Hi Support,
I found a bug that Telerik grid filter for blazor on web assembly version not working for dynamic datasource. While the server one work just fine. Please see the video for more detail. I am also attach the two solution for your investigation.
https://www.loom.com/share/c876a98500ea4a8fbacd3aa30179485d
This same peice of code work in Server version but not for client version
<TelerikRootComponent>
<TelerikGrid Data="@GridData"
Height="350px"
Sortable="true"
Pageable="true"
SortMode="@SortMode.Single"
FilterMode="@GridFilterMode.FilterMenu"
FilterMenuType="@FilterMenuType.CheckBoxList"
PageSize="10">
<GridColumns>
<GridColumn Field="Col1" Width="80px" Locked="true" />
<GridColumn Field="Col2" Width="140px" />
</GridColumns>
</TelerikGrid>
</TelerikRootComponent>
@code { public List<dynamic> GridData = new List<dynamic>();
protected async override Task OnInitializedAsync()
{
for (int i = 1; i < 10; i++)
{
dynamic row = new ExpandoObject();
row.Col1 = $"col1_{i}";
row.Col2 = $"col2_{i}";
GridData.Add(row);
}
} }
Please help me fix this issue ASAP as our product need this filter to ship the release.
Thanks
Huy Nguyen
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.
If a developer changes the structure of the grid in a new release, such as adding or removing columns, the restore can have very unexpected results.
We get around this by storing a version number with the grid and incrementing that number when we change the grid columns. If the version number on the grid does not match the version number stored with the state, we don't restore it.
We would like to see this be more of an automatic feature of the grid.
Compare the columns in the saved state with the columns in the Grid declaration. You may need to change the way the Grid columns are declared, according to the the linked documentation. If there is inconsistency between the two collections, strip the column information from the saved state before restoring it. (This was suggested by Dimo from Telerik in a support ticket)
An alternative would just be to throw away that state when it can't be safely restored.
I have the foreign key issue that is described here:
https://docs.telerik.com/blazor-ui/knowledge-base/grids-foreign-key
I am working with your grid and trying to implement the filter template. I am using the sample code on this page under the section Filter Menu Template:
https://docs.telerik.com/blazor-ui/components/grid/templates/filter
For the text to display I want to use a List of objects that have 2 properties: an id and a text to display.
I have used the grouping header template and the editor template successfully with the foreign key.
My issue with the filter template is as follows:
1. Run the attached project
2. drop down the list
3. select one item
4. press Filter (this works fine)
5. drop down the list
6. unselect the selected field
7. press Filter (this does not work – the list is still filtered)
I am trying to display a related virtual entity from an object in Grid. The List of objects is loaded using Entity Framework Core. I am certain that the related entities are loaded;
The transactions object that is returned ultimately to the TelerikGrid.Data definitely contain the related fields (checked with breakpoint).
<TelerikGrid @ref="@SafexTransactionGrid"
Data=@SafexContractTransactionGridData
ConfirmDelete="true"
Pageable="true"
Groupable="true"
Sortable="true"
FilterMode="GridFilterMode.FilterMenu"
Resizable="true"
Reorderable="true"
EditMode="GridEditMode.Popup"
SelectionMode="GridSelectionMode.Multiple"
PageSize="15"
Navigable="true">
<GridColumns>
...
<GridColumn Field="@nameof(SafexContractTransaction.Trader.Name)" Title="Trader Name" Editable="false"/>
...
</GridColumns>
</TelerikGrid>
@code {
private List<SafexContractTransaction> SafexContractTransactionGridData
{
get
{
// returns all the data including populated Trader property
return FourtyTwoUnitOfWork.SafexContractTransactionRepo.GetAll(SafexContractGrid.SelectedItems);;
}
}
}
private TelerikGrid<SafexContractTransaction> SafexTransactionGrid { get; set; }
}
Yet when the grid is displayed it does not contain the property.
How can I solve this?
It is impractical to set the grid columns to fixed width. I'll explain with example:
I have grid with 4 columns. The grid should have width 100%.
- Column 1: short text, 10-15 characters. I need this one to auto width to content.
- Column 2: checkbox, also auto-width to header title.
- Column 3: free text that may wrap on multiple lines. I need this column to use all available horizontal space so it will push the 4th column to the very right.
- Column 4: button. auto-width to either header title or button width, whichever is wider.
The auto-width feature is already requested: Autofit column widths on data load (telerik.com) but I don't see a feature request to handle the Column 3 scenario.
Our application has, on many pages, complex business logic to enable or disable specific cells based upon the viewing mode, the user's capabilities, the type of data in the row, etc. If a cell is to be disabled, we also want to change the background color.. This is easily accomplished with the OnCellRender property.
However, we cannot enable/disable specific cells within a column without creating a column template with conditional logic. And so, in all our grids, EVERY column has to have a template, just for that trivial function. And now we have business logic smeared across both the razor page and the code page.
A template should be required only if you are doing something unusual or exceptional. Setting a cell to be enabled or disabled is completely routine, and one should not have to create a template just for that.
If you would add a property such as OnCellEnable, to override the column Enabled property on a per-cell basis, it would be extremely useful and would eliminate the need for literally hundreds of templates.
Thanks
Occasionally I am getting TaskCancellation errors such as:
[13:07:52 ERR] Unhandled exception in circuit 'hQsJqY3F4XbTbzQETSggJClg_e4YRyQkrKHFMHCXugM'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Telerik.Blazor.Components.TelerikComboBox`2.Dispose()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
===========
ADMIN EDIT
===========
The error is related to a Microsoft bug. It occurs one minute after some client component has been disposed.
The exceptions are not bypassed due to memory leak. The bug is expected to be fixed in .NET 6 and this will be respected for the Telerik components, so that the errors do not appear.