Hi Support Team,
in our project we are using Telerik Chart and has required to update theme of chart from dark to light and light to dark.
telerik chart in child razor page and dark/light button in mainlayout.razor file but telerik chart updating theme when click on button exist telerik chart razor page. as below link it is an existing issue.
please advice how to resolve the issue.
Hi,
During grid initialization I have duplicate OnReadMethod call. I dynmaically set LoadGroupsOnDemand parameter. When LoadGroupsOnDemand is false and when I skip the second call (I shouldn't do any extra logic to calculate the call number anyway) it works fine. If LoadGroupsOnDemand is true I have to call it twice. With early ending of first call, second OnRender call won't be done. If I do "return" at the begining of second call it returns me an empty grid.
Similar issue to this one: https://feedback.telerik.com/blazor/1442276-onread-called-twice-on-initialization
Sorry for the long question/request...
I'm running into an exception during a TelerikScheduler Edit event when trying to initialize the model. I believe this is occurring because the models are complex objects with another object as a property inside it, where the "submodel" does not have a parameterless constructor. I'm receiving the following exception while debugging:
I read this ticket that discusses a similar issue as well as this ticket which describes the OnModelInit event that allows you to create an instance of the model to pass to the CUD event. However, after implementing the OnModelInit handler the error is still occurring because it is trying to clone that object before passing it to the edit event and is attempting to use a constructor with no parameters which does not exist.
To reiterate the ticket above, it would be nice if the clone process checks to see if the model implements the ICloneable interface. This will allow custom clone behavior which should resolve this issue. Or is there already a fix/workaround for this?
I added a few simplified code segments below as an example of the issue I'm having... (I'm using Blazor Server if that's relevant)
Index.razor:
@page "/"
@using TelerikBlazorTestApp.Models
<TelerikScheduler Data="@Appointments"
AllowCreate="true" AllowDelete="true" AllowUpdate="true"
OnModelInit="@ModelInitHandler">
<SchedulerViews>
<SchedulerDayView />
<SchedulerWeekView />
<SchedulerMonthView />
</SchedulerViews>
</TelerikScheduler>
@code {
public List<SchedulerAppointment<TestModel>> Appointments { get; set; }
protected override async Task OnInitializedAsync()
{
Appointments = new List<SchedulerAppointment<TestModel>>()
{
new SchedulerAppointment<TestModel> { Title = "Test 1", Start = DateTime.Now, End = DateTime.Now.AddHours(1), IsAllDay = false, Model = new TestModel("blah") },
new SchedulerAppointment<TestModel> { Title = "Test 2", Start = DateTime.Now.AddHours(1), End = DateTime.Now.AddHours(2), IsAllDay = false, Model = new TestModel("blah") },
new SchedulerAppointment<TestModel> { Title = "Test 3", Start = DateTime.Now, End = DateTime.Now, IsAllDay = true, Model = new TestModel("blah") }
};
}
public SchedulerAppointment<TestModel> ModelInitHandler()
{
return new SchedulerAppointment<TestModel>("blah");
}
}
SchedulerAppointment.cs:
namespace TelerikBlazorTestApp.Models
{
public class SchedulerAppointment<TItem>
{
public Guid Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
public bool IsAllDay { get; set; }
public string RecurrenceRule { get; set; }
public List<DateTime> RecurrenceExceptions { get; set; }
public Guid? RecurrenceId { get; set; }
public TItem Model { get; set; }
public SchedulerAppointment()
{
Id = Guid.NewGuid();
}
public SchedulerAppointment(string s)
{
Id = Guid.NewGuid();
Model = (TItem)Activator.CreateInstance(typeof(TItem), s);
}
}
}
namespace TelerikBlazorTestApp.Models { public class TestModel { public string PropA { get; set; } public string PropB { get; set; } public TestModel(string s) { // something using s here } } }
Thanks!
Is it possible to allow the adding of aria-label, aria-labelledby, and aria-describedby to the TelerikForm element?
I noticed that aria-labelledby and aria-describedby were added to input elements here: https://feedback.telerik.com/blazor/1531788-allow-setting-aria-labelledby-and-aria-describedby-attributes-to-the-telerik-inputs - so I assume they could be added to TelerikForm too?
Currently, there doesn't seem to be a way to add those attributes, whereas with the default EditForm we can, and so we're unable to leverage the TelerikForm if we want to provide better descriptive information to non-sighted users with a label and description of the form.
Ideally, we should be able to render any HTML element with global attributes: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes , which would include any of the aria-* tags.
I understand there's a desire to have a locked-down API for components and not allow arbitrary attributes, but I think certain attributes core to accessibility the users of the library should have some ability to manipulate.
We have edit dialogs with editable fields on them, and we want to display a confirmation dialog if the user tries to close the edit dialog without saving. Simplified code to illustrate the issue:
Sometimes we need custom filter logic.
The advised approach currently is to use the OnRead event and have to manage the fetching of data manually https://docs.telerik.com/blazor-ui/components/grid/manual-operations
If we could set a column to use a filter function that has Func<GridDataType, Bool>? then we could apply this complex filter without having to repeatedly query the database and apply filters server side.
For example, if I wanted to filter a column that related to an object that had a property that was a Collection<T> I could check the values of this collection against a filter UI I have made somewhere in the grid or outside of it. Then when the columns filterdescriptior was reviewed it would check my Func which returned True if any of the Rows Collection<T> matched my custom filter UI options.
Example use case that this feature would allow;
Please consider refactoring Telerik.DataSource to allow for Dynamic Linq expressions rather than fixed Member.
1. You don't have to reinvent the wheel in creating lambda expressions. You can simplify Telerik.DataSource code to just use Dynamic Linq.
2. Allows support for Sorts & Grouping to be expressions such as "Math.Abs(field ?? 0)" rather than just "field".
I use TelerikMultiSelect as a component for custom filter:
<FilterMenuTemplate>
<TelerikMultiSelect Value="@(AlreadySelectedFilterValues(context.FilterDescriptor))"
OnRead="@OnReadWrapper"
ValueMapper="@ValueMapperWrapper"
TItem="@FilterItemDto"
TValue="@TFilterValue"
ValueField="@nameof(FilterItemDto.Id)"
TextField="@nameof(FilterItemDto.Name)"
AutoClose="true"
Filterable="true"
ClearButton="true"
DebounceDelay="500"
OnChange="@((object newValue) => OnMenuFilterChange(newValue, context))"/>
</FilterMenuTemplate>
Trying to render already selected filters gives two "magic" items in context.FilterDescriptor in AlreadySelectedFilterValues:
These items appear only if TelerikMultiSelect is empty. If I select some from MultySelect these two items disappear and everything works as expected.
GridState has an empty list of FilterDescriptos.
AggregatedAccountNames - string? column.
TFilterValues can be int, int? or string, no matter, the same behavior.
TFilterItemDto - class with int? Id and and string Name fields.
As expected value I expect to have empty FilterDescriptos if nothing was selected.
If the Datepicker's binded value is a DateOnly type, the Min and Max should follow that type.
Hi,
As the subject says, when our app is on the Chinese localization `zh-CN` it causes the date picker to default.
By default I mean the default date becomes 01 01 0001 and you cannot change it no matter what you select.
On any of our other localizations such as es-ES, en-US, fr-FR, etc. (zh-CN is the only one is what I'm getting at) we don't get this issue.
Hi Team,
How to get the last focused element in the Telerik Form?
Example: I have a window with a TelerikForm with 10 textboxes and on click of close. I need to know what is the last focused element
Thanks,
sujana
I see a good solution for angular (PopupSettings.appendTo)
https://www.telerik.com/forums/datepicker-doesn%27t-open-in-ionic-modal#5117655
but blazor only has the PopupClass attribute to work with. Assigning that a class with a large z-index didn't help
It would be really cool to be able to edit documents much like the WPF syntax editor.
Our use case is that we use blazor for our admin tools and we need to give a better look and feel (color coding) to some stored SQL and XML. Nothing fancy just a better experience.
Hello,
it seems there is a bug related to the subject. Run this REPL please https://blazorrepl.telerik.com/wRFaYnEq276w3dK528 and follow the steps in the attached video.
Very thanks.
Miroslav
https://docs.telerik.com/blazor-ui/knowledge-base/inputs-validation-child-component
Number of typos where "Fied" should be "Field".
1 minute fix, just looks bad. 4x in MyCustomComponent and in MainComponent.
Peter
Hi,
I do not think this is a feature yet I am adding it here, so won't put pressure on developers. The problem is that when I add a TelerikGrid inside a TelerikTabStrip it does not adjust well to changes of browser resizing. I have made different ways, like making the siez 100% or dynamic sizing and changing CSS, but each of them may break something. It would be crucial for us if the grid would change well to changes in TelerikTabStrip when its width property is 100%.
Thank you