Consider the use of TextWriter async methods for the HTML Helpers, for example the WriteInitializationScript methods. In certain scenarios the use of the synchronous methods causes an exception: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
This can be resolved by explicitly enabling synchronous operations
services.Configure<IISServerOptions>(options =>
{
options.AllowSynchronousIO = true;
});
though synchronous operations have been disabled by default at framework level as of .NET 3.0.
This just seems like a minor oversight since the Enable(bool) method exists on the DatePicker html helper and other Kendo taghelpers support the enable or enabled attribute, but there doesn't seem to be an enable-like attribute for the kendo-datepicker. Thanks!
<kendo-datepicker for="ReadOnlyDate" enable="false"></kendo-datepicker>
Currently, the Content function for Steps in a Wizard only accepts a string value (see API here).
This means that in order to add a partial view (bound to the current model and its properties), the most straightforward way I could find was to put the partial view (and any wrappers) in its own file and add an extension method "ToHtmlString()". For example:
@model MyModel
@(Html.Kendo().Wizard().Steps(step => {
step.Add().Content(Html.Partial("~/Path/To/View/Wrapper.cshtml", Model).ToHtmlString());
})
using Microsoft.AspNetCore.Html;
using System.IO;
public static class HtmlContentExtensions
{
public static string ToHtmlString(this IHtmlContent htmlContent)
{
if (htmlContent is HtmlString htmlString)
{
return htmlString.Value;
}
using StringWriter writer = new();
htmlContent.WriteTo(writer, System.Text.Encodings.Web.HtmlEncoder.Default);
return writer.ToString();
}
}
@model MyModel
@(Html.Kendo().TabStrip().Items(tabstrip => {
tabstrip.Add()
.Content(@<div id="@Model.TabContainer" class="myTabWrapperClass">
@await Html.PartialAsync("~/Path/To/View.cshtml", Model)
</div>);
})
By default, when the "paste" command is added, the default option is "insert" mode ("Paste (Insert)"). Is it possible to add an option that allows setting the default paste mode to "replace" ("Paste (Replace)")?
In the Scheduler's Timeline view when there are events with the same Start and End dates and one of them is resized, the Scheduler reorders the events automatically, placing the longest event on top and the shortest event at the bottom of the slot. The same occurs in other views, for example, in the Week view the events are automatically reordered from left to right (longest to shortest).
It would be nice to be able to control this behavior and disable it through a dedicated option.
.NET 6 introduced DateOnly and TimeOnly types, but none of the relevant date/time controls support these types.
There is already a feature request to support DateOnly in DatePicker; this feature request is about adding support for TimeOnly to TimePicker.
Currently, when using the default Grid search functionality and the column filter menus, we observe the following:
However, there’s a specific scenario where this does not work properly:
For example:
This functionality behaves correctly in the Telerik UI for Blazor Grid component - the search and column filters are managed as separate objects.
Is it possible to enhance the Grid filtering similar to the Blazor Grid?
At this stage, the Serialize() method depends on Newtonsoft.Json:
using Newtonsoft.Json;
namespace Kendo.Mvc.Infrastructure
{
public class DefaultJavaScriptSerializer : IJavaScriptSerializer
{
public string Serialize(object value)
{
return JsonConvert.SerializeObject(value).Replace(@"<", @"\u003c").Replace(@">", @"\u003e");
}
}
}
Is it possible to remove the dependency and use the System.Text.Json serializer instead?
Hi, is there a way to configure the grid so that when it's grouped and later sorted, the grouping state (expanded/collapsed) is preserved?
Kind Regards
Erwin
It would be convenient to have built-in MultiColumnComboBox editing for the Grid.
I was hoping the component would show the addresses formatted in columns (as per a fields list) and then return the address concatenated into a single to the grid field (e.g. from .DataTextField("FullAddress")).
When my company's users create a new "customer site" they upload the customer's logo and then choose some colours that will form the basis of theming for the customer's site. In that way, a customer will 'feel' like they have their own branded experience when using 'their' website.
The colours are inevitably based on the customer's logo. To use the colour picker component, I have to train my users to go to Paint, load the logo, choose the colour using the colour picker, go into the palette and 'copy the crazy 6-digit numbers that may contain letters of the alphabet that starts with a #' and paste that into the colour picker of our web site.
Rather, I would prefer if they could simply use an eyedropper from the ColorPicker component using functionality similar to https://imagecolorpicker.com/en It would save training and greatly improve the useability of my website.
Can I put that forward as being a feature request?
Thanks
Dave A
Implement an AllowCustom option in the MultiSelect, which would make possible to select a custom value that is not present in the data.
This option is available in the Kendo UI for Angular MultiSelect:
https://www.telerik.com/kendo-angular-ui/components/dropdowns/api/multiselectcomponent#allowcustom
https://www.telerik.com/kendo-angular-ui/components/dropdowns/multiselect/custom-values
Consider changing the design for the ColorPicker's input mode selection.
Currently, this is done through clicking a button with "up" and "down" arrow icons:
A more UI-friendly design for the mode selection would be nice to have, for instance, a radio group, dropdown, switch, etc.
When the fonts and font size dropdown is selected, it will be helpful to view the preview of fonts before applying it to text. Similarly for font size also it will be good to preview them.
In the table wizard the caption alignment dropdown looks very long than required
### Suggestion
Either the dropdown size can be collapsed, or we can describe the images to accommodate the longer size:
I'm in the process of rewriting all Kendo components to use CSP compatible templates. I'm looking at https://docs.telerik.com/aspnet-core/html-helpers/template/overview which shows how we'd use TemplateComponentName() for popup editors and that we would need to rewrite everything in the popup editor to use Kendo Template's AddHtml or AddComponent methods.
Original:
<div class="mb-2 row required">
@Html.LabelFor(model => model.FileName, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
<div class="col-sm-6">
@(Html.Kendo().TextBoxFor(model => model.FileName).HtmlAttributes(new { @class = "w-100" }))
</div>
</div>
<div class="mb-2 row">
@Html.LabelFor(model => model.FileDescription, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
<div class="col-sm-6">
@(Html.Kendo().TextBoxFor(model => model.FileDescription).HtmlAttributes(new { @class = "w-100" }))
</div>
</div>
Rewritten:
@(Html.Kendo().Template()
.AddHtml("<div class='mb-2 row required'>")
.AddHtml(@<text>
@Html.LabelFor(model => model.FileName, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
</text>)
.AddHtml("<div class='col-sm-6'>")
.AddComponent(c => c.TextBoxFor(model => model.FileName).HtmlAttributes(new { @class = "w-100" }))
.AddHtml("</div></div>")
.AddHtml("<div class='mb-2 row'>")
.AddHtml(@<text>
@Html.LabelFor(model => model.FileDescription, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
</text>)
.AddHtml("<div class='col-sm-6'>")
.AddComponent(c => c.TextBoxFor(model => model.FileDescription).HtmlAttributes(new { @class = "w-100" }))
.AddHtml("</div></div>")
)
While this works, this markup seems much harder to read than the original. Could this be made to be simpler? Ideally I'd like to be able to drop my existing mix of html and kendo components in one method and it'd parse through to render the template properly.
When creating columns in a TagHelper Grid definition, the Width property allows only numbers:
<column field="OrderID" width="100">
</column>
This does not match the width property in the Kendo UI and HtmlHelpers Grid definitions which allow string values to be entered as well:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.width
That way, the developer will be able to add rem and other unit values in TagHelper syntax as well.
Also, it would be convenient if there is a new property similar to this:
<column field="OrderID" tooltip="Unique Number of the Order">
</column>
<column field="Freight"
html-attributes='new Dictionary<string, object>{ ["style"] = "width: 30rem;" }'>
</column>