I have a form with a range of checkboxes. With 2.25, the code worked. With 2.26, I receive an error initCheckbox was undefined.
<TelerikWindow @bind-Visible="ShowAdd" Modal="true" Class="NewRequest">
<WindowTitle>Add Applications</WindowTitle>
<WindowContent>
<div style="position: relative; width: 90vw; max-width: 400px; display: grid; ">
<span style="font-size: medium">@thisEmployee.EmpNickName</span>
<div style="align-content: center; padding: 5px; width: 100%; display:flex; justify-content: center; align-items: center; border: inset">
<div style="padding: 1px "><label for="ckDev">Dev</label><TelerikCheckBox Id="ckDev" @bind-Value="@thisEmployee.Developer" /></div>
<div style="padding: 1px "><label for="ckSales">Sales</label><TelerikCheckBox Id="ckSales" @bind-Value="@thisEmployee.Salesman" /></div>
<div style="padding: 1px "><label for="ckEng">Eng</label><TelerikCheckBox Id="ckEng" @bind-Value="@thisEmployee.Engineer" /></div>
<div style="padding: 1px "><label for="ckPE">PE</label><TelerikCheckBox Id="ckPE" @bind-Value="@thisEmployee.LeadEng" /></div>
<div style="padding: 1px "><label for="ckPM">PM</label><TelerikCheckBox Id="ckPM" @bind-Value="@thisEmployee.PM" /></div>
<div style="padding: 1px "><label for="ckPurch">Purch</label><TelerikCheckBox Id="ckPurch" @bind-Value="@thisEmployee.Purchasing" /></div>
<div style="padding: 1px "><label for="ckSF">Shop</label><TelerikCheckBox Id="ckSF" @bind-Value="@thisEmployee.ShopFore" /></div>
<div style="padding: 1px "><label for="ckFS">Super</label><TelerikCheckBox Id="ckFS" @bind-Value="@thisEmployee.FieldSuper" /></div>
</div><br />
<div style="font-size:smaller">
<TelerikGrid Data="@allApps" Height="50vh" FilterMode="@GridFilterMode.FilterMenu" FilterMenuType="@FilterMenuType.CheckBoxList">
<GridColumns>
<GridColumn Field="MenuCategoryTitle" Title="Category" />
<GridColumn Field="MenuCategoryID" Width="0" />
<GridColumn Width="3em">
<Template>
<div style="float:left; cursor:pointer; color: forestgreen; padding-right: 8px" title="Add Category" @onclick="@((args) => AddCategory((context as Index_Menu).MenuCategoryID))"><ic class="fad fa-plus-square" /></div>
</Template>
</GridColumn>
<GridColumn Field="MenuItemID" Width="0" />
<GridColumn Field="MenuItemTitle" Title="App" />
<GridColumn Width="3em">
<Template>
@if ((context as Index_Menu).MIAssigned == false)
{
<div style="float:left; cursor:pointer; color: forestgreen; padding-right: 8px" title="Add App" @onclick="@((args) => AddItem((context as Index_Menu).MenuItemID))"><ic class="fad fa-plus-square" /></div>
}
else
{
<div style="float:left; cursor:pointer; color: red; padding-right: 8px" title="Delete App" @onclick="@((args) => DeleteApp((context as Index_Menu).MenuItemID))"><ic class="fad fa-trash-alt" /></div>
}
</Template>
</GridColumn>
</GridColumns>
</TelerikGrid>
</div>
<div style="align-content:center; padding:5px; width: 100%; display: flex; justify-content: center; align-items: center; ">
<TelerikButton OnClick="@CancelWindow">CLOSE</TelerikButton>
</div>
</div>
</WindowContent>
</TelerikWindow>
I have a column grouped by groupname of producttype having values likes diesel,electric,gas,petrol but i want specific order in groups to appear like diesel,petrol,electric,gas
Using
Protected void onstateinithandler(gridstateeventargs <prdouctmodel> args)
{
gridstate <productmodel> statetobe = new gridstate <productmodel>()
{
GroupDescriptors = new list <groupdescriptor>()
{
new GroupDescriptor()
{ Member= "producttype",
Membertype =typeof (string)
}
},
Collapsedgroups =enumerable.range (0,4).tolist ()
};
args.gridstate = statetobe
}
Would be great to have a user XML Editor, with input/output from string/stream and an attached XSD for continuous validation?
I realise this wouldn't be priority, just wondered if it could be put on roadmap at some point.
Many thanks,
David Speak.
Allow "items per page" and "1 - X of Y items" on the pager configurable or even allow them to be hidden/removed.
On mobile devices the telerik pager takes up too much room and needs to be more responsive. I'm already aware of this feature request: https://feedback.telerik.com/blazor/1442883-responsive-layout-for-the-pager
But I would like to take it a step further and be capable of customizing/removing the text.
Add the following Parameters to the TelerikPager:
[Parameter] public bool ShowItemsPerPageText { get; set; } = true;
[Parameter] public bool ShowXofYItemsText{ get; set; } = true;
<TelerikPager ShowItemsPerPageText="false" />
<TelerikPager ShowXofYItemsText="false" />
In my opinion this looks better
==============
ADMIN EDIT
==============
In the meantime, you can change the pager text through localization. It is important to keep the same number of placeholders, however, so that the string.Format() call it is used in will not throw.
This strings are behind the following keys:
I am experiencing this problem with version 2.29 when the dropdown list is in a "component"
It seems to be intermittent but dependent on how long the async method takes to complete.
Edit page
@page "/"
@using System.Diagnostics
@using System.Threading
@using BlazorApp1.Components
<h1>Hello, world!</h1>
<EditForm class="form-inline" Model="@Model">
<MyComponent />
</EditForm>
Welcome to your new app.
@code {
object Model = new();
private Guid InstanceId;
public Index()
{
InstanceId = Guid.NewGuid();
Debug.WriteLine($"Index - {InstanceId}");
}
protected override Task OnInitializedAsync()
{
Debug.WriteLine("Index - OnInitializedAsync");
return base.OnInitializedAsync();
}
protected override Task OnParametersSetAsync()
{
Debug.WriteLine("Index - OnParametersSetAsync");
return base.OnParametersSetAsync();
}
}
Component
@using System.Diagnostics
<h3>My Component</h3>
<br />
<TelerikDropDownList @bind-Value=_selectedValue Data="@myComboData" TextField="MyTextField" ValueField="MyValueField" TValue="int" TItem="MyDdlModel"></TelerikDropDownList>
<br />
<TelerikButton OnClick="@SayHelloHandler" Primary="true">Say Hello</TelerikButton><br />
@helloString
<br />
@code {
private Guid InstanceId;
MarkupString helloString;
int _selectedValue { get; set; } = 2; // Preselected value
IEnumerable<MyDdlModel> myComboData { get; set; } = Enumerable.Empty<MyDdlModel>();
void SayHelloHandler()
{
string msg = string.Format("Hello from <strong>Telerik Blazor</strong> at {0}.<br /> Now you can use C# to write front-end!", DateTime.Now);
helloString = new MarkupString(msg);
}
public MyComponent()
{
InstanceId = Guid.NewGuid();
Debug.WriteLine($"MyComponent - {InstanceId}");
}
protected override async Task OnInitializedAsync()
{
Debug.WriteLine("MyComponent - OnInitializedAsync");
myComboData = await LoadData();
await base.OnInitializedAsync();
}
protected override Task OnParametersSetAsync()
{
Debug.WriteLine("MyComponent - OnParametersSetAsync");
return base.OnParametersSetAsync();
}
private async Task<IEnumerable<MyDdlModel>> LoadData()
{
await Task.Delay(100);
return Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x });
}
public class MyDdlModel
{
public int MyValueField { get; set; }
public string MyTextField { get; set; }
}
}
Hi,
In most of my projects I use the ObjectGraphDataAnnotationsValidator component for validating complex types; and I also use a lot of your components. I've noticed what I *think* might be a clash between this validator and some of your input components. I've built a simple (and crude) example but I think it demonstrates the problem.
In the example code we have a table with 2 cells - in both cells we have an EditForm and 10 TelerikTextArea components. The first cell's EditForm contains a ObjectGraphDataAnnotationsValidator instance and the 2nd cell doesn't. Hopefully when you try to reproduce you will notice a distinct difference in performance with the performance of the 2nd EditForm being great, while the 1st EditForm is quite laggy and gets worse the more items you add.
I'm wondering if there is a clash here between the ObjectGraphDataAnnotationsValidator and the input components or I'm using them incorrectly?
Thanks
Michael.
@page "/"
<table width="100%">
<tr>
<td width="50%">
<h3>EditForm with ObjectGraphDataAnnotationsValidator</h3>
<EditForm Model="Items">
<ObjectGraphDataAnnotationsValidator />
@foreach (var item in Items)
{
<div style="display: flex">
<TelerikTextArea @bind-Value="item.TextValue" />
@if (Items.IndexOf(item) == (Items.Count - 1))
{
<TelerikButton OnClick="@(() => Items.Add(new DataItem()))">
Add
</TelerikButton>
}
</div>
}
</EditForm>
</td>
<td width="50%">
<h3>EditForm without ObjectGraphDataAnnotationsValidator</h3>
<EditForm Model="Items">
@foreach (var item in Items)
{
<div style="display: flex">
<TelerikTextArea @bind-Value="item.TextValue" />
@if (Items.IndexOf(item) == (Items.Count - 1))
{
<TelerikButton OnClick="@(() => Items.Add(new DataItem()))">
Add
</TelerikButton>
}
</div>
}
</EditForm>
</td>
</tr>
</table>
@code {
protected List<DataItem> Items { get; set; }
protected override void OnInitialized()
{
Items = new List<DataItem>();
for (var i = 1; i <= 10; i++)
{
Items.Add(new DataItem { TextValue = $"This is item number {i}." });
}
}
public class DataItem
{
public string TextValue { get; set; }
}
}
I am implementing custom filtering by column in a data grid. The data source is very large so the filtering will be done by a stored procedure in the database. In order to avoid excessive calls to the procedure it would be great if the TextBox had a DebounceDelay property like the one in the SearchBox.
---
ADMIN EDIT
While not technically useful for the grid itself (see the bottom of this thread for more ideas and information on that, a built-in feature is coming there as well), there can be benefit in adding that to the inputs (e.g., the Editor has something like that already by default because it is designed for large content).
Thus, I am reopening this so we can gauge the interest.
In the meantime, using a few lines of application code can achieve debouncing of expensive api calls. Using the OnChange or OnBlur event may also be suitable workarounds, depending on the goal you are after.
---
Hello Team;
We are building a "Social Media" style application. One of the requirements, is to provide an easy and professional for user to traverse through an Image gallery.
I'd like to request for such feature that allows us:
It would be great if we don't have to resort to use the old jQuery implementation. We're trying to minimize to load jQuery, as Blazor client is already large enough.
Thank you in advance!
..Ben
Please make the source code available to people with paid licences.
---
ADMIN EDIT
The source code for UI for Blazor will become available. Click the Follow button on the upper left hand side to get a notification email when that happens, and click the Vote button to add your vote for it if you need it.
The current plan is to make the source code available to commercial license holders in November 2021.
---
Can we have the Image Gallery control like the ASPX AJAX, please? The slide show feature with various transitions is very useful. Thanks.
https://www.telerik.com/products/aspnet-ajax/image-gallery.aspx
With the default templates for a blazor project there are options for security.
We really need this for the telerik blazor templates or a sample telerik blazor projects using the different types of security.
Rendering the TelerikCalendar control produces HTML with ARIA roles like so:
Documentation: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Gridcell_role
This seems small, but looks bad on accessibility reports, especially when a calendar has 42 'gridcells', The impact is significant when seen in summary.
Alternatively, or in addition, can ARIA roles be turned of for specific controls? In this case including role attributes in the markup is not actually necessary as the roles can be implied by the HTML tags. Including roles that are incorrect is more work for more confusion.
Sometimes it is helpful to allow the user to pick colors for various purposes.
This control can display the RGB value along with allowing them to change the hue/brightness along with the alpha component.
Also the ability to select from a set of predefined colors would be very nice.
---
ADMIN EDIT
Here is a sample project that showcases how you can use Kendo widgets in Blazor and also contains samples of color pickers: https://github.com/telerik/blazor-ui/tree/master/common/kendo-in-blazor
---
The demos and examples for storing and retrieving GRID state uses the JavaScript localStorage.setItem and localStorage.getItem that work great. As part of .NET 5 there's a Microsoft equivalent for accessing Local Storage using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage. I've found the behavior of these demos and examples will not work by simply replacing the JavaScript with .NET equivalents. My experience is getting Circuit Handler exceptions that make these example not work.
Although not a requirement since there's a JavaScript solution for local storage, I would like to recommend that since you partner closely with .NET team at Microsoft. That your GRID development team test and provide examples with the Microsoft .NET 5 out-of-the-box local storage solution and resolve any incompatibilities for developers not wanting to use 1st party local storage solutions embedded within Microsoft Blazor.
----
ADMIN EDIT
I made a sample test and things seemed to work for me, so I made a public example, you can find it in this pull request until it gets merged. I'm also attaching it to this post, but for anyone seeing this after a time - the public repository linked above is a better place to look for this in case more updates and information have been added since the time of writing this.
---
Hi,
If Telerik can, at some point, develop a design tool like the Radzen Design Time, that would really be nice!
Thanks