I'm using Telerik.UI.for.Blazor 3.0.0 and pasting the following HTML does not lead to the expected result.
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
Result (Preview):
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
Result (Raw view):
<p><ul></p><p><li>A</li></p><p><li>B</li></p><p><li>C</li></p><p></ul></p>
Expected Result:
Using Telerik UI for jQuery it was sufficient to set the following setting to get the expected result.
$scope.kendoEditorOptions = { pasteCleanup: { keepNewLines: true, // Removes all HTML elements, such as the all option, but preserves new lines. Disabled by default. } }
I've tried out all different settings that the Blazor version offers using the demo from https://demos.telerik.com/blazor-ui/editor/paste-cleanup?_ga=2.205591514.897269513.1644322509-2087119569.1643891453, but without success.
For a workaround I've implemented the ValueChanged EventCallback to convert from
<p><ul></p>
to
<ul>
on-the-fly, but since each line of the pasted content is wrapped around with with <p>...</p> this is not optimal.
Is there a way to achieve the expected result? It would already help if the automatic wrapping with <p>...</p> tags could be turned off. Otherwise I'm leaning towards switching back to the jQuery version.
Thanks and BR!
Hello,
I am wanting to use a TelerikButton outside of my TelerikGrid to get the current selected row in the Grid, I do not want to use a GridRowButton on each row, but one TelerikButton outside of the grid.
For an example, we have a Grid of employees and each employee is an object in a list of EmployeeVM class objects. which has an EmployeeID for each employee. When the TelerikButton is clicked, I want to get the EmployeeID of the employee selected in the Grid in a method in the @code section that is the same as listed in the OnClick property on the Telerik Button.
I spent some time searching on Google but did not find what I was looking for, I am an experienced developer but new to Telerik UI for Blazor.
Thank you.
As of 3.01, the ExpandedField property of TreeViewBinding no longer exists and we're meant to bind the ExpandedItems property of the tree view instead. However, this is fine for a flat data source but doesn't really work for a hierarchical data source.
I'm loading my hierarchical data source to include all expanded nodes and child nodes so that I can reselect the previously selected node, and this can go down 5 levels or more. So how can I create an expanded items local variable to bind to tree view control from that?
The ExpandedField approach worked fine in this scenario, but I don't see how the ExpandedItems approach can. The only way I can see to resolve is to change my hierarchical data source to be flat which would be a lot of work and wouldn't really be ideal.
On another matter, the class applied to the selected tree node span element seems to have changed from k-state-selected to k-selected, although I don't see this documented anywhere.
Any advice on how I can get round the expanded items problem without drastically rewriting my code would be appreciated.
I'm currently trying to use AuthorizeView to inherit the Policy restrictions to programmatically show/hide the GridCommandButton
Something like this:
<AuthorizeView Policy="@Policies.ManageAllUsersPolicy">
<Authorized>
<GridCommandColumn Width="190px">
<GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
</GridCommandColumn>
</Authorized>
</AuthorizeView>
But I get an Error:
Severity | Error |
Code | RZ9999 |
Description | The child content element 'ChildContent' of component 'GridCommandColumn' uses the same parameter name ('context') as enclosing child content element 'Authorized' of component 'AuthorizeView'. Specify the parameter name like: '<ChildContent Context="another_name"> to resolve the ambiguity |
I'm fairly new to the Kendo UI so I simply tried to name the Context directly on the AuthorizeView/Authorized component and GridCommandColumn (there's no Context property on GridCommanButton)
But without success.
Is it possible to use AUthorizeView, or should I move toward a solution where I manually check to the fulfillment of the policy and use a boolean to show/hide the button?
The dialog doesn't seem to be properly initialized in this scenario.
REPL: Example
Am I correct that it is currently not possible to have a form field that is both formatted as currency and has a hint text? In order to format as anything, it seems we need to use templates, and if we do, the stuff like HintText, Labeltext etc also goes missing?
Having to always use templates for most basic stuff in grids, forms etc. like getting a bool to show up as a checkbox or a simple int to be displayed as currency, is really starting to get to me to be honest...
*** UPDATE If I remove the set culture code, then it works **
Adding Format="{0:d}" to this code Telerik REPL for Blazor - The best place to play, experiment, share & learn using Blazor.
works fine.
If I try to do the same I get this:
First Format="{0}"
Using Format="{0:d}" I get this. Same when I use any other formats like Format="{0:yyyy.MM.dd}"
When not using any kind of format. Not good enough. Missing the year
<TelerikChart RenderAs="RenderingMode.Canvas">
<ChartTitle Text="Prices"/>
<ChartTooltip Visible="true"/>
<ChartLegend Position="ChartLegendPosition.Bottom"/>
<ChartSeriesItems>
<ChartSeries Type="ChartSeriesType.Line"
Name=""
Data="@Details.PriceGraphs"
DashType="@DashType.Solid"
CategoryField="@nameof(InstrumentPriceGraph.UpdateDate)"
Field="@nameof(InstrumentPriceGraph.Price)">
</ChartSeries>
</ChartSeriesItems>
<ChartValueAxes>
<ChartValueAxis Min="@_yMinValue" Max="@_yMaxValue"/>
</ChartValueAxes>
<ChartCategoryAxes>
<ChartCategoryAxis Type="ChartCategoryAxisType.Date" BaseUnit="ChartCategoryAxisBaseUnit.Days">
<ChartCategoryAxisLabels Step="2" Format="{0:d}">
<ChartCategoryAxisLabelsRotation Angle="-45"/>
</ChartCategoryAxisLabels>
</ChartCategoryAxis>
</ChartCategoryAxes>
</TelerikChart>
var culture = new CultureInfo("da-DK");
culture.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy";
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;
1. I am creating a pie chart and the element the chart is nested in has a white background I cant seem to change please help.
2. I am using custom styling and have left out a component I would like to add a single component. I have however changed some of the default telerik styling in the file is there a way I can get the exclusive css for a single component without needing a whole new file?
thanks
https://docs.telerik.com/blazor-ui/components/stepper/events
According to the docs, it says the OnChange event fires before the current step has changed. I'm assuming clicking the Stepper itself triggers this event, but what if I wanted to go to the next step by clicking on a custom button that I've created? This seems like a common use case, is this possible with the stepper?
I don't want to use the Wizard component because it doesn't seem possible to customize it to match my requirement: I want to keep all previous steps' content rendered on the page vertically as you progress through the wizard instead of having the each step content replaced by the next step content. The documentation doesn't seem to allow for customization of the step content rendering behaviour but please correct me if I'm wrong (https://docs.telerik.com/blazor-ui/components/wizard/structure/content).