Telerik Forums
UI for ASP.NET Core Forum
4 answers
121 views
We need your feedback, because we are considering changes in the release approach for Telerik UI for ASP.NET Core. Please provide your feedback in the comments section below:


1. Is it hard to understand the version numbers of our releases? If yes, what makes them hard to understand them?

2. Would semantic versioning (SemVer) of our releases make it easier to understand our version numbers and what's behind them?

3. If we go with SemVer, we might need to start with version 3000.0.0 as we currently use 2022.x.x. Please share your thoughts about this approach and ideas for what number versioning would work best for you.

Andi
Top achievements
Rank 1
Iron
 answered on 26 Apr 2023
1 answer
128 views

Hi!

The ListView is breaking my web application, and I cannot make head or tail of the reason:

An unhandled exception occurred while processing the request.

NotSupportedException: "ClientTemplateId or ClientTemplateHandler" cannot be null or empty.

Kendo.Mvc.UI.ListView<T>.VerifySettings()

 

Also, you demos for the ListView are broken and the browser tab crashed after a while.

I need an urgent fix, as this is affecting the live application.

Aleksandar
Telerik team
 answered on 17 Mar 2023
0 answers
320 views

In our UI for ASP.NET Core R3 2020 (2020.3.915) release, the Column menu message of unsticking a column is "null".

This bug will be resolved in our next official release.

In the meantime, as a workaround, manually set the Unstick Column menu message:

.ColumnMenu(c => c.Messages(m => m.Unstick("Unstick Column")))
Kendo UI
Top achievements
Rank 1
 asked on 16 Sep 2020
2 answers
591 views

I want to display a boolean value in an ASP.NET Core Kendo grid column. However, I need it to display a checkbox in the column because I don't want to show the users the raw data. So, I put in a custom client template because it's not an option to have booleans display a checkbox despite that seeming like an option that should be available by default. However, this grid is supposed to be editable inline using the default CRUD operations and you have to click on the cells to bring up the editor.

The default editor for a boolean column is a checkbox. So, the users click on a checkbox to bring up a different checkbox and it looks like it just didn't work. If I make the initial checkbox greyed out, it looks like they can't edit it. So, no matter what I do, I can't make a column a checkbox and use the default editor without a bunch of ugly design issues which is ridiculous.

Am I just missing something? Is there a better way than resorting to doing scripting with Javascript and setting the column to uneditable?

Maksim
Top achievements
Rank 1
Iron
 updated answer on 03 Jun 2023
1 answer
15 views

Hi,

I upgraded Telerik version in our project (Telerik.UI.for.AspNet.Core nuget) from version 2021.2.616 to version 2023.1.425 and since then is for TabStrip component not working LoadContentFrom.

I have in my controller method like this:

public IActionResult GetProductListPartial()
{
     return PartialView("_ProductList");
}

And in my View I have code like this:

 @(Html.Kendo().TabStrip()
                .Name("tabstrip")
                .Items(tabstrip =>
                {
                    tabstrip.Add()
                            .Text(@Localizer["Menu.ProductList"])
                            .Selected(true)
                            .LoadContentFrom("GetProductListPartial", "ProductList")
                            .ContentHtmlAttributes(new { @class = "product-list-tab" });
                }))

When I reworked implementation in the View, then it started to work again:

 @(Html.Kendo().TabStrip()
              .Name("tabstrip")
              .Items(tabstrip =>
              {
                  tabstrip.Add().Text(@Localizer["Menu.ProductList"])
                      .Selected(true)
                       //.LoadContentFrom("GetProductListPartial", "ProductList")
                      .Content(@<text>@await Html.PartialAsync("_ProductList")</text>)
                      .ContentHtmlAttributes(new { @class = "product-list-tab" });
              }))
My point is, I didn't find anywhere, that LoadContentFrom is not supported anymore and also in application it's still buildable and looks like it should work. What is the required change for working it again please?
Alexander
Telerik team
 answered on 31 May 2023
1 answer
5 views
I have Visual Studio 2022 installed and want to use datepicker. Where is the datepicker.dll locate so I can reference it?
Alexander
Telerik team
 answered on 30 May 2023
1 answer
20 views

I'm wondering if there is any support for styling a Dialog in the .net core version of telerik that I am trialling right now?  The documentation lists the ability to add a cssclass but that is only for the button, not for the entire dialog itself, I need to replicate previous functionality we were using where a cssclass is applied to the object in javascript when the dialog has been open for a certain amount of time.

This was the only documentation I could find and it's only able to add a class to the button, not the entire dialog.

Configuration, methods and events of Kendo UI Dialog - Kendo UI for jQuery (telerik.com)

Alexander
Telerik team
 answered on 29 May 2023
1 answer
8 views

I have a grid defined as such:

@(Html.Kendo().Grid<AuditViewModel>()
    .Name("AuditLogGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.Id).Hidden(true);
        columns.Bound(c => c.UserId).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.TableName).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.AuditType).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.KeyValuesValue).Encoded(false).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.OldValuesValue).Encoded(false).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.NewValuesValue).Encoded(false).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
        columns.Bound(c => c.ChangedColumnsValue).HtmlAttributes(new { @class = "k-text-right", style = "vertical-align: text-top" });
    })
    .Pageable(pager => pager.Refresh(true))
    .Sortable()
    .Filterable()
    .NoRecords()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .PageSize(10)
        .ServerOperation(true)
        .Events(events => events.Error("error_handler"))
        .Model(model =>
        {
            model.Id(p => p.Id);
            model.Field(p => p.UserId);
            model.Field(p => p.TableName);
            model.Field(p => p.AuditType);
            model.Field(p => p.KeyValuesValue);
            model.Field(p => p.OldValuesValue);
            model.Field(p => p.NewValuesValue);
            model.Field(p => p.ChangedColumnsValue);
        })
        .Read(read => read.Action("GetAuditLogs", "Audit").Data("forgeryToken"))
    ))

And in my "GetAuditLogs" controller methods, I pass in the "request.Page" and "request.PageSize" to calculate Skip and Take.  The EF query call DOES return records (default is set to 10 records) however when returning from the Controller, the Grid displays "No Records"

My controller method is as follows:


[HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<IActionResult> GetAuditLogsAsync([DataSourceRequest] DataSourceRequest request)
    {
        _logger.LogDebug("GetAuditLogsAsync()");
        try
        {
            var logs = await _auditService.GetAsync(null, q => q.OrderByDescending(x => x.DateTime),
                string.Empty, request.Page, request.PageSize);
            var total = await _auditService.CountAsync(null, string.Empty);
            var models = logs.Select(x => new AuditViewModel
            {
                Id = x.Id,
                UserId = x.UserId,
                DateTime = x.DateTime,
                TableName = x.TableName,
                AuditType = x.Type,
                KeyValues = string.IsNullOrWhiteSpace(x.PrimaryKey) ? new Dictionary<string, object>() :
                    JsonSerializer.Deserialize<Dictionary<string, object>>(x.PrimaryKey),
                OldValues = string.IsNullOrWhiteSpace(x.OldValues) ? new Dictionary<string, object>() :
                    JsonSerializer.Deserialize<Dictionary<string, object>>(x.OldValues),
                NewValues = string.IsNullOrWhiteSpace(x.NewValues) ? new Dictionary<string, object>() :
                    JsonSerializer.Deserialize<Dictionary<string, object>>(x.NewValues),
                ChangedColumns = string.IsNullOrWhiteSpace(x.AffectedColumns) ? new List<string>() :
                    JsonSerializer.Deserialize<List<string>>(x.AffectedColumns)
            });

            var result = await models.ToDataSourceResultAsync(request);
            result.Total = total;
            return Json(result);
        }
        catch (Exception ex)
        {
            _logger.LogError($"GetAuditLogsAsync() | error [{ex}]", ex);
            throw;
        }
    }

And the Audit Service "GetAsync" looks like:


public async Task<IEnumerable<Data.Entities.Audit>> GetAsync(
        Expression<Func<Data.Entities.Audit, bool>>? filter = null,
        Func<IQueryable<Data.Entities.Audit>, IOrderedQueryable<Data.Entities.Audit>>? orderBy = null,
        string includeProperties = "",
        int page = 0,
        int pageSize = 0)
    {
        IQueryable<Data.Entities.Audit> query = _dbSet;
        if (filter != null)
        {
            query = query.Where(filter);
        }

        if (!string.IsNullOrWhiteSpace(includeProperties))
        {
            query = includeProperties.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                .Aggregate(query, (current, includeProperty) => current.Include(includeProperty));
        }

        var result = orderBy != null
            ? orderBy(query)
            : query;

        if (page > 0 && pageSize > 0)
        {
            result = result.Skip((page - 1) * pageSize).Take(pageSize);
        }

        return await result.ToListAsync();
    }

I have verified that the returned results ARE correct (based on Id's), but the Grid displays "No Records".  I'd rather not return the ENTIRE dataset to the grid as it is quite large (and the models can be large - this is for auditing so it contains EVERYTHING that was modified).  Is there something I'm missing?
Mike
Top achievements
Rank 1
Iron
 answered on 28 May 2023
1 answer
8 views

I have a grid defined as thus:

@(Html.Kendo().Grid<SubServiceViewModel>()
    .Name("SubServiceGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.Id).Hidden(true);
        columns.Bound(c => c.Service)
            .ClientTemplate("#=Service.Value#")
            .Filterable(false)
            .Sortable(false);
        columns.Bound(c => c.Value);
        columns.Bound(c => c.Active).Hidden(true);
        columns.Bound(c => c.Deleted).Hidden(true);
        columns.Command(c => c.Destroy());
    })
    .ToolBar(toolbar =>
    {
        toolbar.Create();
        toolbar.Save();
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable(pager => pager.Refresh(true))
    .Sortable()
    .Filterable()
    .NoRecords()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .PageSize(10)
        .ServerOperation(true)
        .Events(events => events.Error("error_handler").RequestEnd("onRequestEnd('staticNotifications')"))
        .Model(model =>
        {
            model.Id(p => p.Id);
            model.Field(p => p.Service).DefaultValue(ViewData["defaultService"] as ServiceViewModel);
            model.Field(p => p.Value);
            model.Field(p => p.Active).DefaultValue(EntityLiterals.Yes);
            model.Field(p => p.Deleted).DefaultValue(EntityLiterals.No);
        })
        .Read(read => read.Action("GetSubServices", "SubService").Data("forgeryToken"))
        .Create(create => create.Action("CreateSubServices", "SubService").Data("forgeryToken"))
        .Update(update => update.Action("UpdateSubServices", "SubService").Data("forgeryToken"))
        .Destroy(destroy => destroy.Action("DeleteSubServices", "SubService").Data("forgeryToken"))
    ))

And if I remove the 

.Filterable(true)

I get a JS error when I click the column filter button


Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at C (kendo.all.js:318535:21)
    at init._createForm (kendo.all.js:318535:21)
    at init._init (kendo.all.js:318535:21)
    at init._click (kendo.all.js:318535:21)
    at HTMLAnchorElement.dispatch (jquery.min.js?v=oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl-cbzUq8:2:43184)
    at y.handle (jquery.min.js?v=oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl-cbzUq8:2:41168)
C @ kendo.all.js:318535
_createForm @ kendo.all.js:318535
_init @ kendo.all.js:318535
_click @ kendo.all.js:318535
dispatch @ jquery.min.js?v=oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl-cbzUq8:2
y.handle @ jquery.min.js?v=oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl-cbzUq8:2
However, because I'm using InCell editing, I have a ViewData object populated with my DropDown items (with the UI Hint), similar to the demo.  Is there any way around this?
Mike
Top achievements
Rank 1
Iron
 answered on 25 May 2023
1 answer
5 views

 

I'm using Trial for testing. But when the number of items is selected more, the text box displaying the item grows larger, breaking the interface of the page. I just want to show the number of selected items (Checked) to replace checked items, is it possible to process? Please guide how. Displays fine both when the event is selected and the initial default load of items is checked.

 

Example:

Mihaela
Telerik team
 answered on 24 May 2023
Top users last month
Luis Michel Silva
Top achievements
Rank 2
Iron
Jie
Top achievements
Rank 1
Iron
Thomas
Top achievements
Rank 2
Iron
Austin
Top achievements
Rank 1
Iron
Iron
Adrian
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?