I can't find a way to reliably set focus after a tab change.
In the sample below it first sets focus based on the OnAfterRenderAsync code, but switching to tab 2 and then going back I can't get it to set focus again.
I suspect its because there is no render type of event on a specific tab that I can hook into?
I have tried javascript and blazor and can't seem to figure a way around it.
@page "/test"
<TelerikTabStrip ActiveTabIndex="@TabActiveIndex" Height="87vh" Class="ct-tabstrip" ActiveTabIndexChanged="@TabIndexChanged">
<TabStripTab Title="Orders Search">
<input type="text" @ref=orderSearchTextBox id="test"/>
<br />
<input type="text" />
<br />
<input type="text" />
</TabStripTab>
<TabStripTab Title="Orders Updated Today">
<text>Tab 2</text>
</TabStripTab>
</TelerikTabStrip>
@code {
private ElementReference orderSearchTextBox;
private int TabActiveIndex;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await orderSearchTextBox.FocusAsync();
}
}
public async Task TabIndexChanged(int NewIndex)
{
TabActiveIndex = NewIndex;
if (NewIndex == 0)
{
await orderSearchTextBox.FocusAsync();
}
}
}
Currently, the Splitbar of the TelerikSplitter is rather small.
It can be adjusted with CSS as shown here (https://blazorrepl.telerik.com/wnEfmyYp50ldIHsF13) but if the overall height of the page is large, the small arrow-icon that needs to be clicked in order to expand a collapsed SplitPane must be scrolled into view first.
It would be great to add alternative ways to expand a SplitPane, e.g. on a Double-Click on the Splitbar or maybe an additional Button.
https://demos.telerik.com/blazor-ui/form/templates
When you edit in Telerik Repl, you get a warning message:
What was weird though, is when I ran it from directly from the link in the documentation, I didn't get an error. I made one small change to the code (swapped line 54 and 55 (just seeing if I could change the rendering order, which I can) and then I saw this warning. But any change to the code generates the warning.
Peter
Please add the option for the Multiselect to filter the same way the DropDownList does. It's very odd & confusing for end users (and bad UX) in a UI toolkit for similar controls to do things in different ways. Can you please add the ability for the Multiselect control to filter items in the popup window the same way the DropDownList does with the nice filter text box.
My grid bind to ExpandoObjects, and I would like to implement a Group Header.
So I referenced these two documents
https://docs.telerik.com/blazor-ui/knowledge-base/grid-binding-to-expando-object
https://docs.telerik.com/blazor-ui/components/grid/columns/multi-column-headers
From the first document, it make sense to me that we need to set FieldType for each column that binds to ExpandoObject, but it seems this restriction also applies to the group header column, which does not make sense.
Foe example:
<TelerikGrid Data="@GridData"
Pageable="true"
Sortable="true"
FilterMode="@GridFilterMode.FilterRow">
<GridColumns>
<GridColumn Title="Test Group Header">
<Columns>
<GridColumn Field="PropertyInt" Title="Int Column" FieldType="@typeof(int)" />
<GridColumn Field="PropertyString" Title="String Column" FieldType="@typeof(string)" />
<GridColumn Field="PropertyDate" Title="DateTime Column" FieldType="@typeof(DateTime)" />
</Columns>
</GridColumn>
</GridColumns>
</TelerikGrid>
I get error:
I need to set FieldType on the "Test Group Header" column to an arbitrary value to get rid of this error.
Hi
I don't understand the text in this yellow info box: "You can define a key for zooming only selection zooming is configured." Is there a word missing?
https://docs.telerik.com/blazor-ui/components/chart/pan-and-zoom/zoom#specifying-a-key-for-zooming
What is the plan for docking control or docking manager?
If you want to validate a form using FluentValidation right now you must rely on a third party validator like the ones suggested in the FluentValidation documentation.
We have noticed most of these libraries have not been updated in a long while despite issues being opened and pull requests pending:
Also, we noticed that these libraries don't fully implement all the features that FluentValidation has to offer.
Ex: We wanted to use the Rulesets to validate fields partially when the input has changed (like maximum lenght or regexes) and then validate the more complex rules like "unique in DB" after the "submit" button of the form has been pressed but it seemed like it would run all validations ignoring the rulesets.
Other components libraries have already implemented FluentValidation natively, could Telerik consider implementing this aswell so we can stop relying on third party libraries and have a better implementation of the FluentValidation?
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).
Hi,
I am looking to use strongly-typed IDs in my project and it does not appear to be possible to achieve this with Telerik UI for Blazor. Instead, the popup does not go away on selection and the bound value does not update.
Note that this is not a request for binding to arbitrary complex types. I believe it would be sufficient to support value types that implement ToString / IParsable.
For example:
https://blazorrepl.telerik.com/QxvcQIPR55jFAGMF00
<h1>Hello, Telerik REPL for Blazor!</h1>
<h2>Selected Value: @SelectedValue</h2>
<TelerikDropDownList Data="@Data"
@bind-Value="@SelectedValue"
TextField="@nameof(SelectItem.DisplayName)"
ValueField="@nameof(SelectItem.Value)"
DefaultText="Select ...">
</TelerikDropDownList>
@code {
public MyValue SelectedValue {get; set;}
public SelectItem[] Data { get; } = new[] {
new SelectItem(1),
new SelectItem(2),
};
public readonly struct MyValue : System.IParsable<MyValue> {
public int Value {get;}
public MyValue(int value) {
this.Value = value;
}
public override string ToString() {
return Value.ToString();
}
public static MyValue Parse(string str, IFormatProvider provider) {
return new(int.Parse(str, provider));
}
public static bool TryParse(string str, IFormatProvider provider, out MyValue value) {
value = new(int.Parse(str, provider));
return true;
}
}
public class SelectItem {
public SelectItem(int value) {
Value = new(value);
DisplayName = $"Item {value}";
}
public MyValue Value {get; set;}
public string DisplayName {get; set;}
}
}
Thanks,
Ben
The OnRowClick event of the TelerikGrid is only triggered when clicking the row with the left mouse button as discussed on the following forum post:
https://www.telerik.com/forums/grid-onrowclick-event-for-middle-mouse-button-click
Please add support to the OnRowClick event to trigger it for a middle mouse button click (and pass the mouse button clicked in the eventargs) or add a separate OnRowClick event that is triggered on middle mouse button click.
Greetings,
I find input adornments very useful. However I noticed that when I click them, the control doesn't get the focus. E.g., with this code:
<TelerikTextBox>
<TextBoxPrefixTemplate>
First name
</TextBoxPrefixTemplate>
</TelerikTextBox>
Clicking on First name doesn't do anything. I would expect the control to be focused when I do that.
You will find an image in attachment showing a green area that, when clicked, brings focus on the textbox. Input adornment is in dark gray. I'm using it as a label for the control but even if it was simply an icon, it would be strange to not be able to focus on the control when clicking it.
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);
}
}
}
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.
On Blazor filter field parameters, please consider adding
1/ Group options, eg using demo sample fields drop down looks like this
Id
Quantity
Freight
Country
Ship to
Ship Address
but it would be useful to allow groping fields by common categories?
Group-1
-Id
-Quantity
-Freight
Group-2
-Country
-Ship to
-Ship Address
2/ Related, can you also add sort index for group and fields so they can be sorted by index rather than field name. Sometimes groups and fields require different order that is not always alphanumerical and may change order based on other selections.
3/ Maybe consider feature parity with filter field options here querybuilder
On Blazor Filter, please consider option to drag and drop rules to re-order the rules. It's a common user request that when creating complex rules that user has ability to move rules around without having to delete and create again. User loses information and data when rules are deleted and can be difficult to relocate in long drop downs.
Ability to drag and drop move of existing rules would improve user experience. Any change to GUI should also reflect in updated FilterDescriptor.
===
ADMIN EDIT
===
The order of the filter rules in one group does not make a difference for the FilterDescriptor. Thus, the current request applies to dragging filter rules from one group to another.