Hi
Is there a better way to add an automated permission than replacing an existing component type?
How else can I automatically check permissions on the base component "TelerikButton" instead of "MyTelerikButton"?
With a large number of thousands of fields, it does not want to fill the Enable/Visible per field.
My question is not only about permissions, but also about the ability to extend TelerikButton with its my additional [Parameter] which is not included in the basic set.
I would be grateful if you could suggest a better solution.
@foreach (var item in ListOfItemNames.Take(200))
{
<div class="row">
<div class="col">
<label for="@item">@item</label>
<MyTelerikButton Id="@item" Form="Device" Icon="SvgIcon.Stop" Title="@item" OnClick="@ButtonAction" ButtonType="ButtonType.Button" />
<MyTelerikTextBox Id="@item" Name="Device" Value="@item"></MyTelerikTextBox>
@* ...<Telerik...> etc *@
</div>
</div>
}
My Component
public class MyTelerikButton: TelerikButton
{
[CascadingParameter (Name = "Privileges")]
public required List<Privilege> Privileges { get; set; } = [];
protected override void OnInitialized()
{
base.OnInitialized();
var buttonName = Form + Id;
Enabled = Privileges.Any(x=>x.Code == buttonName);
}
}
In a TelerikSplitter when I click a button that causes data to load, every element at that level and lower gets the attribute tabindex="-1" for a split second and then the property is removed. Is there any function of the Splitter or Loader/LoaderContainer that would do this? This causes explicitly set tabindex attributes to be completely removed.
Update/Solution:
I determined that this was the result of an intermediate Blazor component calling some JavaScript to disable tabbing on load. This issue is unrelated to the Telerik LoaderContainer.
Hi,
I'm upgrading my Telerik version to 4.6.0 and when I want to use custom FontIcon the icon is not displayed. I see in the HTML that my icon content is defined the same in both situations.
It work with the FontIcon.FilterClear but not with the custom:
<TelerikButton Icon="@FontIcon.FilterClear"> Font Icon Button <TelerikButton />
<TelerikButton Icon="@("k-icon k-i-filter-clear")">Custon Font Icon Button<TelerikButton />
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<TelerikButton Icon="Calendar" Primary="true" OnClick="@(_ => DateRangeFilter(3))">3 Months</TelerikButton>
Icon="Calendar" Primary="true" - both of the properties tell it does not exist in the current context.
I would like to use a third party set of SVG images for buttons. I was hoping I could do something like:
<GridCommandButton Command="View" Icon="@/assets/magnifying_glass.svg" >View</GridCommandButton>
Is this possible?
I have seen the documentation on highlighting rows, but I haven't seen anything around getting a row to highlight outside of row selection and checkbox selection.
Hello,
I want to set the value of a tool tip based on a value of an item in my grid. I have tried this, but I get an error:
This is above all HTML taken from an example
<TelerikTooltip TargetSelector=".tooltip-target">
</TelerikTooltip>
<GridColumn Editable=false Locked=true Visible="@isIDVisible" Field=@nameof(ProductDto.ProductId) Title="ID" Width="150px">
<Template>
@{
var item = (ProductDto)context;
}
<TelerikButton ThemeColor="success" OnClick="() => SetAmtToAnotherCol(item)">Test</TelerikButton>
<br />
<TelerikButton FillMode="link" ThemeColor="info" Class="tooltip-target"
Title="(@item.UnitsInStock < 0) ? 'neg' : 'pos'"
OnClick="() => SetAmtToAnotherCol(item)">@item.UnitsInStock</TelerikButton>
</Template>
</GridColumn>
I receive this error:
RZ9986 | Component attributes do not support complex content (mixed C# and markup). Attribute: 'Title', text: '(item.UnitsInStock < 0) ? 'neg' : 'pos''
|
If I simply do this, it works:
Title=@item.UnitsInStock.ToString()
Is there a way for me to set a string based on a value?
I have an EditForm with some simple attributes that I would like to edit. The TelerikButtons, Abort and Save, are directly implemented and call the necessary business logic.
But now I would also like to implement the EditForm as a TelerikDialog popup to quickly record data. Sadly, the buttons are duplicated.
How should I go about not duplicating the functionality? Can I somehow move them or redirect the dialogbuttons to call them?
<TelerikDialog Visible="@IsAssetCreationVisible" ButtonsLayout="@DialogButtonsLayout.End" Width="30%">
<DialogContent>
<GameAssetCreatePage AssetType="AssetType.Text"></GameAssetCreatePage>
</DialogContent>
<DialogButtons>
<TelerikButton>Abort</TelerikButton>
<TelerikButton Id="@GameAssetCreatePage.EditFormId"
ButtonType="ButtonType.Submit"
ThemeColor="@ThemeColor.Primary">Save and Close</TelerikButton>
</DialogButtons>
</TelerikDialog>
<TelerikButton Class="mr-1" ButtonType="@ButtonType.Button" ImageUrl=@GetImageUrl(@name) OnClick="@(()=>AttachmentOnClickHandler(name))">@name</TelerikButton>