Hi,
I'm sure I'm being stupid but could anyone help with why the following classes are inaccessible when I try to follow the example at https://www.telerik.com/blazor-ui/documentation/knowledge-base/grid-custom-cell-formatting-with-radspreadstreamprocessing#custom-cell-formatting-of-the-exported-file-with-radspreadstreamprocessing ?
It's not like they are completely unrecognised, just inaccessible due to their protection level.
What am I missing?
Thanks,
Dean
'CellValueType' is inaccessible due to its protection level
'IWorkbookImporter' is inaccessible due to its protection level
'SpreadImporter' is inaccessible due to its protection level
'IWorksheetImporter' is inaccessible due to its protection level
'IWorkbookImporter.WorksheetImporters' is inaccessible due to its protection level
'IWorksheetImporter.Name' is inaccessible due to its protection level
'IRowImporter' is inaccessible due to its protection level
'IWorksheetImporter.Rows' is inaccessible due to its protection level
'IRowImporter.RowIndex' is inaccessible due to its protection level
'ICellImporter' is inaccessible due to its protection level
'IRowImporter.Cells' is inaccessible due to its protection level
'ICellImporter.Value' is inaccessible due to its protection level
'ICellImporter.Format' is inaccessible due to its protection level
'ICellImporter.ColumnIndex' is inaccessible due to its protection level
'ICellImporter.RowIndex' is inaccessible due to its protection level
'ICellImporter.ColumnIndex' is inaccessible due to its protection level
'IRowImporter.RowIndex' is inaccessible due to its protection level
Hi,
in my existing project I use custom filter rows for the grid:
<GridColumn Field="@column.DbName" FieldType="@type" Title="@column.HeaderName.Sanitize()" Width="@(column.DbName == nameof(Worker.BinderId) ? "230px" : "200px")" Lockable="true">
<FilterCellTemplate>
@if (type == typeof(string))
{
<CustomTextRowFilter Context="@context"/>
}
else if (type == typeof(int) || type == typeof(int?) || type == typeof(decimal) || type == typeof(decimal?))
{
<CustomNumberRowFilter Context="@context"/>
}
else if (type == typeof(DateTime) || type == typeof(DateTime?))
{
<CustomDateRowFilter Context="@context"/>
}
else if (type == typeof(bool) || type == typeof(bool?))
{
<CustomBooleanRowFilter Context="@context"/>
}
</FilterCellTemplate>
Furthermore I use the OnStateInit and OnStateChanged events so save and restore user settings for filters, groupings etc.
private async Task OnStateInitHandler(GridStateEventArgs<object> args)
{
ShowSpinner = true;
var stateValue = await AppStateService.GetAppStateAsync(SelectedProjectGuid, CurrentUser.Id, AppStateType.GridWorkerState);
if (!string.IsNullOrWhiteSpace(stateValue))
{
var state = AppStateHelper.GetItem<GridState<object>>(stateValue);
if (state != null)
{
await CleanGridState(state);
args.GridState = state;
}
}
ShowSpinner = false;
}
With the filter's initialization I set the value and operator:
protected override Task OnInitializedAsync()
{
Field = ((FilterDescriptor) Context.FilterDescriptor.FilterDescriptors[0])?.Member;
SetValue(((FilterDescriptor)Context.FilterDescriptor.FilterDescriptors[0]).Value);
SetOperator();
return base.OnInitializedAsync();
}
Up to now every time the grid was loading the filter values have been set correctly and the grid has filtered the records.
Now, after updating to a new Telerik version, the grid still filters correctly. But the filter component doesn't get the values and so doesn't show them.
The reason is:
Before update the process was... Init grid -> OnStateInit -> Init filter component
Now it is... Init grid -> Init filter component -> OnStateInit
So, the grid state is pulled too late.
Has the init sort order been changed? How can I get this solved?
Best regards,
Rayko
Hello,
I am currently experimenting with the ChipList component and the documentation suggests that it delivers the same customization options as the Chip component. However, I am unable to find a way to change the ThemeColor of the chips. Is this feature supported, and if so, how can it be implemented?
Reference that suggests this is possible: Blazor ChipList
Customization
Built on top of the existing Blazor Chip component, the Telerik UI for Blazor ChipList delivers the same customization options to meet any design requirements. These include the color and style of the ChipList, whether to display a close or delete icon and whether to add avatars or images as part of the ChipList content.
Thanks
<GridCommandColumn>
<GridCommandButton Command="MyOwnCommand"
Icon="@SvgIcon.InfoCircle"
ThemeColor="@ThemeConstants.Button.ThemeColor.Tertiary"
OnClick="@MyCustomCommandOnClickHandler">click Me</GridCommandButton>
</GridCommandColumn>
Hi,
in a Blazor Grid with Column Virtualization and multiple ow selection enabled, when I use the "Select all" option the column virtualization doesn't load any further values on scrolling.
I took an example from the Telerik docs and added a checkbox column:
https://blazorrepl.telerik.com/QzOPbePP34Fw94E733
Is there any solution for this?
Best regards,
Rayko
I'm trying to reference a TelerikComboBox in a razor component, but it keeps returning null.
(I'm using version 6.2.0)
Any clues?
Html:
<TelerikComboBox Class="hide-combobox-buttons"
Data="@AllLabels"
Value="@Label"
@ref="ComboBoxRef"
ValueChanged="@((string newValue)=> ValueChanged(newValue))"
AllowCustom="true">
</TelerikComboBox>
@code{
private TelerikComboBox<string, string>? ComboBoxRef { get; set; }
[Parameter]
public IReadOnlyList<string>? AllLabels { get; set; }
private string Label { get; set; } = string.Empty;
protected override async Task OnInitializedAsync()
{
if (ComboBoxRef != null) //here it's always null
await ComboBoxRef.FocusAsync();
await base.OnInitializedAsync();
}
}
Background: Grid bound to a List provided by EF from SQL data source. Pageable=true. EditMode=Incell.
Process:
1. User clicks Add button
2. In the Add event handler for the button, a new object instance is created and added to the List that is Data bound to the grid (last item in the List not an Insert ... this is a user requirement and must be added to end of List)
3. StateHasChange(), Grid?.Rebind
4. Force the grid to scroll to the last item.
I researched and found this Telerik documentation Scroll to Selected Grid Row and it suggests I have to use JavaScript "scrollIntoView()"?? I absolutely do NOT want to go this route for what should be a very simple process. Please tell me there is a better way?
I was "hoping" I could use SelectionMode=Single and bind SelectedItemsInPage and then programmatically set the SelectedItem to the last item in the List (Data=) and Telerik Grid would do the control update to appropriate page and make the last row visible in the grid. Unfortunately this is not the case.
Do you folks have a more Blazor-Server like approach for .NET 9 and 7.1.0 suite?
Rob.
I have a DeleteHandler:
private async Task OnDeleteAsync(GridCommandEventArgs args)
{
if (ViewModel == null) throw new InvalidOperationException("ViewModel == null");
if (!(args.Item is ProductUi product_ui)) throw new InvalidOperationException("!(args.Item is ProductUi product_ui)");
if (product_ui.Id == null) throw new InvalidOperationException("product_ui.Id == null");
var result = await ViewModel.DeleteUiAsync(product_ui.Id.Value);
if (result.Error != null)
await Dialogs!.AlertAsync(result.Error, "Delete Error");
}
If there is an error I try to display it using one of Telerik's standard Dialogs.
If there is an error the dialog is displayed, however the grid then displays a busy spinner and the entire window is disabled.
There is now a deadlock, can't close the dialog because the grid has disabled input, the grid is busy because it is waiting for the dialog.