With an active Blazor trial, the Telerik Document Processing NuGet packages are not found in the Visual Studio Package Manager and in the Terminal as well:
Three methods in Telerik.Blazor.Extensions.ReflectionExtensions call target.GetType() without first checking whether target is null. When a null object reaches any of these methods (e.g. via ConvertToFileEntry receiving a null data item), a NullReferenceException is thrown. Consider adding a null return/guard, which will prevent the exception.
Affected methods:
HasGetter
GetPropertyValue
SetPropertyValue
Proposed change:
Add an early null return/guard for target in each method, consistent with the existing null check for propertyName:
public static bool HasGetter(this object target, string propertyName)
{
if (target == null || propertyName == null)
{
return false;
}
// ...
}
public static object GetPropertyValue(this object target, string propertyName)
{
if (target == null || propertyName == null)
{
return null;
}
// ...
}
public static void SetPropertyValue(this object target, string propertyName, object value)
{
if (target == null)
{
return;
}
// ...
}Expected outcome
The value in a numeric textbox cannot be changed for negative numerbes unless you erase all the text and restart.
<TelerikNumericTextBox Decimals="4"Max="5"Value="-4.56m"Id="general"></TelerikNumericTextBox>
(Also applies to AutoComplete, DropDownList, MultiSelect, MultiColumnComboBox).
When using Height="auto" in the popup settings and filtering with a dropdown above the component, the dropdown detaches from the main component.
<ComboBoxPopupSettings Height="auto"></ComboBoxPopupSettings>https://blazorrepl.telerik.com/cKkSQGFO50ovCpr829
A possible workaround is to use a MaxHeight that is less than half the browser viewport.
<ComboBoxPopupSettings Height="auto" MaxHeight="45vh"></ComboBoxPopupSettings>
File data is not available in the Upload's OnSuccess event.
Regression in version 9.0.0 introduced with the addition of the chunk upload functionality.
https://github.com/telerik/blazor/blob/master/js/telerik-blazor/src/upload/upload.ts#L282-L288
<TelerikUpload SaveUrl="/api/upload/save"
RemoveUrl="/api/upload/remove"
OnSuccess="@OnSuccessHandler" />
@code {
async Task OnSuccessHandler(UploadSuccessEventArgs e)
{
foreach (var file in e.Files)
{
Console.WriteLine($"Name = {file.Name}, Size = {file.Size}, Extension = {file.Extension}");
}
StateHasChanged();
}
}
The properties have their default values (null for Name and Extension and 0 for Size).
The actual file data is accessible in the OnSuccess event handler.
All
8.1.1
Hi Support,
I have an issue with the DragToSelect feature of a Telerik grid in Blazor when this grid is inside a TelerikWindow.
Summary
When a TelerikGrid configured with GridSelectionSettings DragToSelect="true" is rendered inside the <WindowContent> of a <TelerikWindow>, the drag-to-select (rubber-band) behavior is not working properly — the user can only select cells/rows via individual clicks.
Single-click selection continues to work in both cases. The issue is specific to the drag gesture.
Steps to reproduce
Create a page with a TelerikWindow set to Visible="true".
Inside <WindowContent>, place a TelerikGrid with:
SelectionMode="@GridSelectionMode.Multiple"
SelectedCells / SelectedCellsChanged bound
<GridSettings><GridSelectionSettings SelectionType="@GridSelectionType.Cell" DragToSelect="true" /></GridSettings>
Open the window and try to select multiple cells by pressing the mouse button on a cell and dragging over neighboring cells.
Expected behavior
A rubber-band selection rectangle appears and all cells the pointer passes over become selected — same as when the identical grid is placed on a regular page (outside a modal window).
Actual behavior
Drag selection occur rarely. Only the single cell under the initial mousedown gets selected. The rubber-band rectangle rarely appears, and SelectedCellsChanged fires with a single descriptor instead of the full drag range.
Minimal repro (REPL-ready)
<TelerikWindow Visible="true" Width="800px" Height="500px">
<WindowTitle>Repro</WindowTitle>
<WindowContent>
<TelerikGrid Data="@Data" TItem="SampleItem"
SelectionMode="@GridSelectionMode.Multiple"
SelectedCells="@SelectedCells"
SelectedCellsChanged="@((IEnumerable<GridSelectedCellDescriptor> c) => SelectedCells = c)">
<GridSettings>
<GridSelectionSettings SelectionType="@GridSelectionType.Cell" DragToSelect="true" />
</GridSettings>
<GridColumns>
<GridColumn Field="@nameof(SampleItem.Id)" />
<GridColumn Field="@nameof(SampleItem.Name)" />
</GridColumns>
</TelerikGrid>
</WindowContent>
</TelerikWindow>
@code {
public record SampleItem(int Id, string Name);
private List<SampleItem> Data = Enumerable.Range(1, 20).Select(i => new SampleItem(i, $"Item {i}")).ToList();
private IEnumerable<GridSelectedCellDescriptor> SelectedCells = Enumerable.Empty<GridSelectedCellDescriptor>();
}
Now my questions :
- Is this a known limitation of DragToSelect when the grid is inside a modal TelerikWindow?
- Is there an officially supported workaround (CSS pointer-events tweak on .k-overlay, event capture override, grid setting, etc.)?
- If it is a bug, could you open a public issue we can track?
Many thanks you in advance.
Franck Boisdé
Example:
<PageTitle>Home</PageTitle>
<div>
<TelerikTextBox Width="20rem" Placeholder="Pallet" DebounceDelay="1000" @bind-Value="@_textInput" OnChange="@(async (input) => await OnInputChanged(input))" />
</div>
<p>@_textInput</p>
@code {
private string? _textInput;
private async Task OnInputChanged(object input)
{
Console.WriteLine($"Immediate: function parameter: {input}, bound variable: {_textInput}");
await Task.Delay(1000);
Console.WriteLine($"Delayed: function parameter: {input}, bound variable: {_textInput}");
//Make the OnChange event receive the immediate value when the DebounceDelay is set
}
}The DebounceDelay is set to 1 second to highlight the behavior, although we have observed it with delays less than 100 milliseconds when the input is from a barcode scanner and the Enter is part of the scan. Start the sample, type "123" in the input, and hit enter within 1 second.
The output in the console is:
Immediate: function parameter: , bound variable:
Delayed: function parameter: , bound variable: 123
The ComboBox value is cleared.
The ComboBox value remains.
When clicking on a tab to drag it to reorder, it will process the tab change as soon as the tab is clicked to start a drag operation. Preferably, we'd like the tab select action to only happen on a mouseup instead of a mousedown (and cancelled on drag.) This is a reproduction in the REPL: https://blazorrepl.telerik.com/mAayPpGb59GjWvUT47. But it so simple that you probably don't need it. This is the main razor file:
We have a Telerik card control that uses the Card Image. Upon inspecting the HTML issues, I see that it is missing an alt tag for a few images. When I drill down, these images are from our card image. Is there a plan to add an alt tag?
=====ADMIN EDIT======
Possible workaround in the meantime:
<TelerikCard Width="300px">
<CardHeader>
<CardTitle>Tourism</CardTitle>
</CardHeader>
<img class="k-card-media" alt="test" src="https://docs.telerik.com/blazor-ui/components/card/images/rome.jpg" />
<CardBody>
<CardTitle>Rome</CardTitle>
<CardSubTitle>Capital of Italy</CardSubTitle>
<CardSeparator></CardSeparator>
<p>
Rome is a sprawling, cosmopolitan city with nearly 3,000 years of globally influential art, architecture and culture on display.
Ancient ruins such as the Forum and the Colosseum evoke the power of the former Roman Empire.
</p>
</CardBody>
<CardActions Layout="@CardActionsLayout.Stretch">
<TelerikButton Class="k-flat" Icon="@SvgIcon.HeartOutline" Title="Like"></TelerikButton>
<TelerikButton Class="k-flat" Icon="@SvgIcon.Comment" Title="Comment"></TelerikButton>
<TelerikButton Class="k-flat">Read More</TelerikButton>
</CardActions>
<CardFooter>
<span style="float:left">Created by @@john</span>
<span style="float:right">March 05, 2021</span>
</CardFooter>
</TelerikCard>
Hello,
please provide support for "onError" or something similar for CardImage. If Image.png is not available show NoImage.png.
<img class="" style="" src="@($"https://xyz.blob.core.windows.net/amsmedia/image.png")"
onError="this.src='\NoImage.png'" alt="article photo" />
How can I do the same with CardImage?
<CardImage Src="@image.Uri.AbsoluteUri" onError="???"></CardImage>Thanks
When the HTML is rendering, I don't see the Id. I need it for QA Test automation.
<TelerikButtonGroup SelectionMode="ButtonGroupSelectionMode.Single" >
<ButtonGroupToggleButton Class="pg-toggle-item"
Id="ToggleButton_Block" Selected="@item.IsBlockDomain">Decsription1</ButtonGroupToggleButton>
<ButtonGroupToggleButton Class="pg-toggle-item"
Id="ToggleButton_Allow" Selected="@item.IsAllowDomain">Decsription2</ButtonGroupToggleButton>
<ButtonGroupToggleButton Class="pg-toggle-item"
Id="ToggleButton_Cookieblock" Selected="@item.IsBlockCookies"> Decsription3 </ButtonGroupToggleButton>
</TelerikButtonGroup>
We are using the blazor chat component with Microsoft.Extensions.AI and IChatClient. Currently during a long response stream the chat repeatedly scrolls to the bottom automatically as the response updates. When I use use my mouse wheel to scroll to the top it immediately auto scrolls me back to the bottom.
A user needs to be able scroll to the top as the response is streaming in. If the user manually scrolls the auto scrolling should stop. Any subsequent messages sent in the same chat session should resume auto scroll. This is the behavior seen in most AI chat interfaces like chatGPT and is what most users expect.
For more info and a video refer to support ticket: 1712888
Thanks, Justin.
When the dropdown is open, the button's aria-controls attribute references a value that matches the popup's data-id, not its actual id. Since aria-controls must point to an element's id, the attribute is invalid and no element in the DOM matches the reference, breaking the accessible relationship between the button and its popup.
aria-controls="50dc5df2-b83e-41bd-8c34-98470aba77c6"
data-id="50dc5df2-b83e-41bd-8c34-98470aba77c6" id="8630d4e4-2f22-4eaf-b96c-7cae113b70ed"
<TelerikDropDownButton Icon="@SvgIcon.Share" OnClick="@(()=>OnItemClick("Primary"))">
<DropDownButtonContent>Share</DropDownButtonContent>
<DropDownButtonItems>
<DropDownButtonItem Icon="@SvgIcon.Facebook" OnClick="@(()=>OnItemClick("Facebook"))">Facebook</DropDownButtonItem>
<DropDownButtonItem Icon="@SvgIcon.Twitter" OnClick="@(()=>OnItemClick("Twitter"))">Twitter</DropDownButtonItem>
<DropDownButtonItem Icon="@SvgIcon.Linkedin" OnClick="@(()=>OnItemClick("Linkedin"))">Linkedin</DropDownButtonItem>
<DropDownButtonItem Icon="@SvgIcon.Reddit" OnClick="@(()=>OnItemClick("Reddit"))">Reddit</DropDownButtonItem>
</DropDownButtonItems>
</TelerikDropDownButton>Currently, on mobile devices (where is no hover), to open the child menu you need to click/tap the parent and the only way close it afterwards is if you click away. This is not very convenient for mobile usage. I want to be able to close the child menu on click/tap of the parent as well.
When ActiveTabId is null, the TabStrip selects the first tab automatically, but does not render its content.
<TelerikTabStrip @bind-ActiveTabId="@TabStripActiveTabId">
<TabStripTab Title="First" Id="t1">
First tab content.
</TabStripTab>
<TabStripTab Title="Second" Id="t2">
Second tab content.
</TabStripTab>
<TabStripTab Title="Third" Id="t3">
Third tab content.
</TabStripTab>
</TelerikTabStrip>
@code {
private string? TabStripActiveTabId { get; set; }
}
Possibly related to https://github.com/telerik/blazor/issues/2594
(optional)
The first locked column (ID) is rendered after the second locked column (Product Name). When you resize a non-locked column, the ID column disappears and is revealed at its new position after you scroll the Grid horizontally.
The behavior is reproducible with RTL enabled.
The order of the locked columns should persist.