Hi,
I am trying to filter items from code and get this error:
cannot implicity convert type 'system.collections.generic.list<telerik.datasource.filterdescritptorbase>' to 'system.collections.generic.icollection<telerik.datasource.ifilterdescriptor>'>
Please see code below:
private async Task FilterByNameAndWritter()
{
List<FilterDescriptorBase> filterDescriptorBases = new List<FilterDescriptorBase>();
filterDescriptorBases.Add(new FilterDescriptor() { Member = "Name", Operator = FilterOperator.Contains, Value = Name, MemberType = typeof(string) });
filterDescriptorBases.Add(new FilterDescriptor() { Member = "Writter", Operator = FilterOperator.Contains, Value = Writter, MemberType = typeof(string) });
GridState<BookDto> gridState = new GridState<BookDto>();
gridState.FilterDescriptors = filterDescriptorBases; // the error comes from here
await BookGrid.SetState(gridState);
}
The component can bind to a DateTime variable.
The expected behaviour is that only the time part is updated, so that the actual date is preserved.
For instance if I want to want to let the user set a time for an appointment tomorrow, the appointment should not move to today because the time was changed
Unlink TelerikButton's, ToolbarButton's do not have a ThemeColor, so cannot change their colour like you could a normal button.
This is really an issue as of 3.0.0, not before I should note.
Hi,
I've migrated my project to version 3.0 and I've issue with row virtualization.
Before migration virtualization was working fine.
<TelerikGrid
Data=@_items
TotalCount=@_browseDataManager.TotalCount
OnRead=@ReadItems
PageSize="10"
Height="100%"
RowHeight="40"
Pageable="false"
Sortable="true"
ScrollMode="GridScrollMode.Virtual">
<GridColumns>
<GridColumn Field="@(nameof(UnitOfMeasureDTO.Code))" Title=@_localizer["Form_UnitOfMeasure_Code"] Width="100px" Locked="true" />
<GridColumn Field="@(nameof(UnitOfMeasureDTO.ShortName))" Width="200px" Title=@_localizer["Form_UnitOfMeasure_ShortName"] Locked="true"/>
<GridCommandColumn Width="150px" Context="UnitOfMeasureCommands">
<GridCommandButton OnClick="@((args) => Edit(args.Item as UnitOfMeasureDTO))" Icon="edit"></GridCommandButton>
<GridCommandButton OnClick="@((args) => Delete(args.Item as UnitOfMeasureDTO))" Icon="delete"></GridCommandButton>
</GridCommandColumn>
</GridColumns>
<GridToolBar>
<GridCommandButton OnClick="@(() => Create())" Icon="add">@_localizer["Title_Crud_Add"]</GridCommandButton>
</GridToolBar>
</TelerikGrid>
protected async Task ReadItems(GridReadEventArgs args)
{
_browseDataManager.CurrentSkip = args.Request.Skip;
_browseDataManager.CurrentPageSize = args.Request.PageSize;
await GetDataAsync();
IsBusy = false;
}
I've noticed that parameter TotalCount has removed from grid control.
<TelerikGrid
Data=@_items
OnRead=@ReadItems
PageSize="10"
Height="100%"
RowHeight="40"
Pageable="false"
Sortable="true"
ScrollMode="GridScrollMode.Virtual">
<GridColumns>
<GridColumn Field="@(nameof(UnitOfMeasureDTO.Code))" Title=@_localizer["Form_UnitOfMeasure_Code"] Width="100px" Locked="true" />
<GridColumn Field="@(nameof(UnitOfMeasureDTO.ShortName))" Width="200px" Title=@_localizer["Form_UnitOfMeasure_ShortName"] Locked="true"/>
<GridCommandColumn Width="150px" Context="UnitOfMeasureCommands">
<GridCommandButton OnClick="@((args) => Edit(args.Item as UnitOfMeasureDTO))" Icon="edit"/>
<GridCommandButton OnClick="@((args) => Delete(args.Item as UnitOfMeasureDTO))" Icon="delete"/>
</GridColumns>
<GridToolBar>
<GridCommandButton OnClick="@(() => Create())" Icon="add">@_localizer["Title_Crud_Add"]</GridCommandButton>
</GridToolBar>
</TelerikGrid>
Error
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Blazor.Components.Grid.GridRowCollection`1[[Hyperion365.Web.Shared.DTOs.UnitOfMeasureDTO, Hyperion365.Web.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].BuildRenderTree(RenderTreeBuilder __builder) at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
The problem happens for "large" files. I re-produced it for files as small as 123,260 bytes (123 kilobytes!) even when FileSelect.MaxFileSize=223260 or MaxFileSize=int.MaxValue!
Is this by design in the FileSelect component to not support files greater than a hundred kilobytes, or am I doing something wrong? There is nothing in the documentation warning about such tiny file limits.
Update:
I can upload files of any size when I add this line to the code. It of course is a hack and the real problem is in the design of FileSelect and should be fixed there.
builder.Services.Configure<HubOptions>(options =>
{
options.MaximumReceiveMessageSize = null;
});
Was this setting enabled by the Telerik engineers who tested the control? Because it is not in the default VS project and anyone creating a vanilla VS project and using FileSelect will not be able to use it with anything > 10-20kb or so :/
Another problem: (sometimes?) even when the file is uploaded successfully using all-default code, the uploaded file cannot be re-written because it remains locked despite the upload process finishing successfully. There is a place in the Telerik code that is opening the destination file and NOT disposing it properly.
Hi,
Where can we find an actual sample/example of how to use this to obtain a file from the stream? Something like
file.Stream.GetAllBytes()
throws an exception of not being implemented and so far we have not been able to get any other methods to work either.
Non of the demos here https://demos.telerik.com/blazor-ui/fileselect/overview seem to actually implement a file upload method, where the stream is used. The validation demo does not even have server side validation.
Thanks.
I have some dates that are being translated into a different date in my C# from what is in the Component.
I have the below component (I've tried multiple different formats)
<TelerikDatePicker @bind-Value="@this.MyModel.DateOfService" Label="Date of Service" />
When entering the below dates, I get the following outputs.
Entered Date 1 = 11/15/2021
Date 1 Output in C# = 1/15/2021
{1/15/2021 12:11:00 AM} <- Notice the 11 is in the Minutes slot
----------------------
Entered Date 2 = 05/05/1955
Date 2 Output in C# = 1/5/1955
{1/5/1955 12:05:00 AM} <- Notice the 5 is in the Minutes slot
I'm not performing any translation of the dates.
The property is DateTime type and modeled directly to the property, yet it is not interpolating the dates correctly in these cases.
Telerik.UI.for.Blazor V 2.27
Hi there,
I'm new at telerik and I'm trying to use the grid component.
unfortunately i keep getting this error:
Unhandled exception rendering component: Could not find 'TelerikBlazor.initGrid' ('TelerikBlazor' was undefined).
Error: Could not find 'TelerikBlazor.initGrid' ('TelerikBlazor' was undefined).
I have installed telerik.ui.for.blazor in both Client and Server projects. I have installed telerik.ui.for.blazor as i couldn't find anywhere in the documentation the specific packaged that needs to be installed in order to start using the components and I thought the aforementioned should be the right one.
Please find below code inside the component:
<Telerik.Blazor.Components.TelerikGrid Data="@Books">
<GridColumns>
<Telerik.Blazor.Components.GridColumn Field="@nameof(Book.Name)"></Telerik.Blazor.Components.GridColumn>
</GridColumns>
</Telerik.Blazor.Components.TelerikGrid>
Please note that using only <TelerikGrid></TelerikGrid> is not permitted by the project.
Any help would be appreciated. Or if you could please specify which package needs to be installed (in case I have installed the wrong package)
Thank you very much.
Kind regards
Hello
We have only one filter option in our Grid in a FilterMenu.
The previous css is not working anymore after the update to version 3.0.0.
.k-filter-menu-container .k-dropdown,
.k-filter-menu-container .k-state-empty:nth-of-type(2n),
.k-filter-menu-container .k-textbox:nth-of-type(2n),
.k-filter-menu-container .k-datepicker:nth-of-type(2n+1),
.k-filter-menu-container .k-numerictextbox:nth-of-type(2n) {
display: none;
}
.k-filter-menu-container .k-dropdown:first-of-type {
display: block;
}
We have changed it to:
.k-filter-menu-container .k-dropdownlist,
But that shows the wrong dropdownlist.
How can we fix that?