Hi Team,
I am looking for captcha component to verify user as human like below screenshot. Please let me know if this feature is available
Hi, I just came accross a bug in the TelerikStepper.
I try to create a custom version that switches to a custom success icon after a step is completed.
It contains the following codesnippets:
<TelerikStepper Linear="true" ValueChanged="@HandleValueChanged">
<StepperSteps>
@for (int i = 0; i < IsValidArray.Length; i++)
{
<StepperStep Valid="@IsValidArray[i]"></StepperStep>
}
</StepperSteps>
</TelerikStepper>
@code {
bool?[] IsValidArray = [null, null, null, null];
public void HandleValueChanged(int index)
{
for (int i = 0; i < IsValidArray.Length; i++)
{
IsValidArray[i] = index > i ? true : null;
}
}
}
Forward it works like expected:
When moving backwards it behaves strange:
Except if you are debugging (Visual Studio debugger), then everything works as expected:
Same thing can be achived when not debugging but clicking on the step a second time.
This can not be solved by adding the @key parameter as suggested in https://feedback.telerik.com/blazor/1659827-bug-in-the-telerikstepper-in-blazor from Hristian Stefanov!
Nevertheless, it turns out that the Task.Delay(1); seems to solve the Issue somehow.
Is this intended?
Please consider adding to Blazor UI a drop-down treeview component with:
Example:
Thank you
Hi,
Here is my demo DatePicker Demo
In Firefox, after I use the mouse to black all texts out, then DatePicker only selects the month field in the place holder. I expect to select all texts.
In Chrome or Edge, the DatePicker works as expected, after blacking texts out, it selects all texts in the place holder
Could you please check the issue?
Thanks and regards,
Tung
Need feature parity in the Blazor rich text editor similar to the Angular rich text editor. Need access to add custom schema elements and tag highlighted text with those new schema elements.
https://www.telerik.com/kendo-angular-ui/components/editor/schema/
currently am able to do this with custom Marks in the angular version.
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".
Trying to group by some nullable column. Expanding the group returns the entire dataset instead of only these rows with value == null.
Use case: Some users can not be assigned to any Team. Want to group by Teams and see users not assigned to any Team.
Steps to reproduce:
Expected results:
Expanding the group by not assigning Teams returns only these users what doesn't have any teams by applying filtering.
Actual results:
Expanding the group by not assigning Teams returns all users without filtering.
Code:
@using Telerik.DataSource
@using Telerik.DataSource.Extensions
Scroll through the groups or expand them to load their data on demand
<TelerikGrid TItem="@object"
LoadGroupsOnDemand="true"
Groupable="true"
OnStateInit="@((GridStateEventArgs<object> args) => OnStateInitHandler(args))"
OnRead="@ReadItems"
ScrollMode="@GridScrollMode.Virtual" PageSize="20" RowHeight="60"
Navigable="true" Sortable="true" FilterMode="@GridFilterMode.FilterRow" Height="600px">
<GridColumns>
<GridColumn Field="@nameof(Employee.Name)" FieldType="@typeof(string)" Groupable="false" />
<GridColumn Field="@nameof(Employee.Team)" FieldType="@typeof(string)" Title="Team" />
<GridColumn Field="@nameof(Employee.Salary)" FieldType="@typeof(decimal)" Groupable="false" />
<GridColumn Field="@nameof(Employee.IsOnLeave)" FieldType="@typeof(bool)" Title="On Vacation" />
</GridColumns>
</TelerikGrid>
@code {
List<object> GridData { get; set; }
protected async Task ReadItems(GridReadEventArgs args)
{
// sample data retrieval, see comments in the service mimic class below
DataEnvelope<Employee> result = await MyService.GetData(args.Request);
if (args.Request.Groups.Count > 0)
{
args.Data = result.GroupedData.Cast<object>().ToList();
}
else
{
args.Data = result.CurrentPageData.Cast<object>().ToList();
}
args.Total = result.TotalItemCount;
}
void OnStateInitHandler(GridStateEventArgs<object> args)
{
// set initial grouping
GridState<object> desiredState = new GridState<object>()
{
GroupDescriptors = new List<GroupDescriptor>()
{
new GroupDescriptor()
{
Member = "Team",
MemberType = typeof(string)
},
new GroupDescriptor()
{
Member = "IsOnLeave",
MemberType = typeof(bool)
}
}
};
args.GridState = desiredState;
}
public class Employee
{
public int EmployeeId { get; set; }
public string Name { get; set; }
public string? Team { get; set; }
public bool IsOnLeave { get; set; }
public decimal Salary { get; set; }
}
public class DataEnvelope<T>
{
public List<AggregateFunctionsGroup> GroupedData { get; set; }
public List<T> CurrentPageData { get; set; }
public int TotalItemCount { get; set; }
}
public static class MyService
{
private static List<Employee> SourceData { get; set; }
public static async Task<DataEnvelope<Employee>> GetData(DataSourceRequest request)
{
if (SourceData == null)
{
SourceData = new List<Employee>();
var rand = new Random();
for (int i = 1; i <= 3; i++)
{
SourceData.Add(new Employee()
{
EmployeeId = i,
Name = "Employee " + i.ToString(),
Team = "Team " + i % 100,
IsOnLeave = i % 3 == 0,
Salary = rand.Next(1000, 5000)
});
}
SourceData.Add(new Employee()
{
EmployeeId = 3,
Name = "Employee " + 3.ToString(),
Team = null,
IsOnLeave = 3 % 3 == 0,
Salary = rand.Next(1000, 5000)
});
}
await Task.Delay(500);// deliberate delay to showcase async operations, remove in a real app
// retrieve data as needed, you can find more examples and runnable projects here
// https://github.com/telerik/blazor-ui/tree/master/grid/datasourcerequest-on-server
var datasourceResult = SourceData.ToDataSourceResult(request);
DataEnvelope<Employee> dataToReturn;
if (request.Groups.Count > 0)
{
dataToReturn = new DataEnvelope<Employee>
{
GroupedData = datasourceResult.Data.Cast<AggregateFunctionsGroup>().ToList(),
TotalItemCount = datasourceResult.Total
};
}
else
{
dataToReturn = new DataEnvelope<Employee>
{
CurrentPageData = datasourceResult.Data.Cast<Employee>().ToList(),
TotalItemCount = datasourceResult.Total
};
}
return await Task.FromResult(dataToReturn);
}
}
}
The following code successfully renders the pdf viewer when the edit form is commented out, but when indside the pdf viewer it fails to render and gives the following error:
"Telerik.Blazor.Components.TelerikComboBox`2[Telerik.Blazor.Components.PdfViewer.Models.PdfViewerZoomLevelDescriptor,System.String] requires a value for the 'ValueExpression' ValueExpression is provided automatically when using 'bind-Value'.See more at https://docs.telerik.com/blazor-ui/knowledge-base/requires-valueexpression ."
@page "/pdfBug"
@* <EditForm Model="_fakeContext"> *@
<TelerikPdfViewer Data="@PdfSource"
OnDownload="@OnPdfDownload"
Height="600px"></TelerikPdfViewer>
@* </EditForm> *@
@code {
private byte[] PdfSource { get; set; }
private async Task OnPdfDownload(PdfViewerDownloadEventArgs args)
{
args.FileName = "PDF-Viewer-Download";
}
protected override void OnInitialized()
{
PdfSource = Convert.FromBase64String(PdfBase64);
base.OnInitialized();
}
private const string PdfBase64 = "JVBERi0xLjEKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUj4+ZW5kb2JqCjIgMCBvYmo8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDEvTWVkaWFCb3ggWy00MCAtNjQgMjYwIDgwXSA+PmVuZG9iagozIDAgb2JqPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9SZXNvdXJjZXM8PC9Gb250PDwvRjE8PC9UeXBlL0ZvbnQvU3VidHlwZS9UeXBlMS9CYXNlRm9udC9BcmlhbD4+ID4+ID4+L0NvbnRlbnRzIDQgMCBSPj5lbmRvYmoKNCAwIG9iajw8L0xlbmd0aCA1OT4+CnN0cmVhbQpCVAovRjEgMTggVGYKMCAwIFRkCihUZWxlcmlrIFBkZlZpZXdlciBmb3IgQmxhem9yKSBUagpFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZgowMDAwMDAwMDIxIDAwMDAwIG4KMDAwMDAwMDA4NiAwMDAwMCBuCjAwMDAwMDAxOTUgMDAwMDAgbgowMDAwMDAwNDkwIDAwMDAwIG4KdHJhaWxlciA8PCAgL1Jvb3QgMSAwIFIgL1NpemUgNSA+PgpzdGFydHhyZWYKNjA5CiUlRU9G";
private FakeContext _fakeContext = new FakeContext() { Name = "Test" };
public class FakeContext
{
public string Name { get; set; }
}
}
I have a ComboBox that gets data from a remote service, using virtualization. When the PageSize property is big enough (in my case 20), I have issues scrolling down. I'm trying to scroll but it removes the input text.
You can use your own demo examples to replicate this issue. To reproduce the issue, try the ComboBox - Virtualization, in Telerik REPL (Demo).
Create a word style component.
Currently my wpf desktop app uses a editor style component and refreshes a crystal reports window component to show edits made to a pre created document. We use this to create quote letters using custom legal jargon.
I am in the process of moving that program to Blazor. A word component that i can wrap our custom texts around and buttons in the title bar for pasting our prefomatted text would be so much better than our current setup.
Could this be added to the roadmap?
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!
What is the plan for docking control or docking manager?
When I select value that is right after first range I cannot scroll back to the previous range again due to a mechanism that makse scroling near to the selected value harder.
This is something I will continue to push for, and have been for two years. We NEED a Month View that is able to hold more than two appointments without showing the ellipse button. See my previous comments at https://feedback.telerik.com/blazor/1527587-allow-displaying-more-than-two-events-per-day-in-the-scheduler-month-view
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