Telerik Forums
UI for ASP.NET MVC Forum
2 answers
302 views
We need your feedback, because we are considering changes in the release approach for Telerik UI for ASP.NET MVC. 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.

Anders
Top achievements
Rank 1
Veteran
Iron
 answered on 10 Aug 2023
1 answer
3 views

How to display the "File(s) saved successfully in the Custom Kendo Upload Template.

 

Using the template below:

<span class='k-progress'></span>
<div class='file-wrapper'>
    <span class='file-icon #=addExtensionClass(files[0].extension)#'></span>
    <div class='file-heading file-name-heading'>Name: #=name#</div>
    <div class='file-heading file-size-heading'>Size: #=kendo.toString(size/1024,"n2")# KB</div>
    <div class="file-heading file-error-heading">
    #if (files[0].error) { # <span class="k-file-validation-message"> #= files[0].error # </span> # } #
    </div>
</div>
Mihaela
Telerik team
 answered on 28 Mar 2024
4 answers
1.3K+ views
Hi Support,

I am using kendo drop down list in grid.
I am facing an issue on scroll of the page when the drop down was opened while edit/add in grid. (See attachment) 
When kendo ui drop down opened try to scroll with the mouse wheel, the kendo dropdown list is detaching from it and moving on the page with the scroll.

Is there any fix for this to make it close on scroll .
To produce the scenario :-  
1>  open the drop down list using mouse scroll wheel move the page up/down .
2> List also will move to up and down by detaching from the element

Any help much appreciated.
thanks in advance

Saroj
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
 answered on 27 Mar 2024
0 answers
2 views

Hello, I am trying to make a function that can resize my spreadsheet sheet dynamically based on the data, which is load on the sheet.

I know that the Spreadsheet has a function called "resize". I pass the numbers of columns and rows with a ViewBag, from the controller to the View on JS.

Controller:

public ActionResult Menus_Read([DataSourceRequest] DataSourceRequest request)
{
    try
    {
        List<MenuViewModel> menus = db.GetMenus();
        DataSourceResult result = menus.ToDataSourceResult(request);
        ViewBag.RowCount = menus.Count;
        ViewBag.ColumnCount = typeof(MenuViewModel).GetProperties().Length;
        
        return Json(result, JsonRequestBehavior.AllowGet);
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.ToString());

        ModelState.AddModelError(string.Empty, ex.Message);
        return Json(new[] { new object() }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet); ;
    }
}

 

JS:

    $(document).ready(function() {
        var rowCount = @(ViewBag.RowCount);
        var columnCount = @(ViewBag.ColumnCount);

        var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
        var sheet = spreadsheet.activeSheet();
        sheet.resize(rowCount, columnCount);
    });

To use the ViewBag content for the view I first need to get the data, to check the count of the columns and rows. Maybe this could be my problem, the timing.

Has anyone had a similar problem or can help me?

Herr Walter Gartmann
Top achievements
Rank 1
 asked on 27 Mar 2024
0 answers
1 view

I have a simple MVC Grid

with a column that looks like this

        columns.Bound(c => c.FirstName).Filterable(fi => fi.Cell(ce => ce.Operator("contains").SuggestionOperator(FilterType.Contains)));

the grid is just

        .Filterable()

Searching and GPT told me to do it this way, however when I filter that column I still only get the default filter of Equals

https://imgur.com/FewY7E0

Dale
Top achievements
Rank 1
 asked on 26 Mar 2024
1 answer
7 views

Hi

How do you enable tabbing on all elements in a Kendo Grid.   I have set  .Navigatable() - but doesn't seem to do anything.

I want the user to tab through the rows, including the page numbers  (items per page) and the filter boxes.

 

thx!@

Viktor Tachev
Telerik team
 answered on 22 Mar 2024
1 answer
12 views

I'm using Kendo v 2023.2.606 from the Kendo CDN.
In my view I have the following code:

<div class="row row-cols-lg-auto gx-3 gy-2 align-items-baseline mt-2">
    <div class="col">
        <h4>Choose File</h4>
        <!-- upload a file -->
        @(Html.Kendo().Upload()
            .Name("files")
            .Multiple(false)
            .ShowFileList(false)
            .Async(_ => _
                .Save("SubmitFile", "DataImport", new { Area = "Admin" })
                .Batch(true)
                .AutoUpload(true)
            )
            .Events(_ => _
                .Upload("onUpload")
                .Success("onUploadSuccess")
                .Error("onUploadFail")
            )
            .Validation(_ => _
                .AllowedExtensions(new string[] { "xls", "xlsx", "csv" })
                .MaxFileSize(3145728)
            )
        )
    </div>
</div>

If I select a file with an extension that is not listed, e.g. .zip, or I select a file that is more than 3.14MB all I see is this:

It does not hit my MVC controller action (which is fine) but the only indication of a problem is the (!) icon. The icon is not clickable.

Why is it not displaying a message saying the file is not valid/too big?

Ivan Danchev
Telerik team
 answered on 20 Mar 2024
0 answers
9 views

Hello,

I'm encountering an issue with the autocomplete functionality in Kendo UI Grid. While the data selected through autocomplete is correctly added to hidden fields, it does not appear in the Grid.

Specifically, after using the autocomplete functionality, I checked whether the correct data was added to the respective hidden fields and found that the values I expected were indeed present in those fields. However, I noticed that these values were not visible in the Grid. This implies that the data selected by users is not being properly reflected within the Grid.

In summary, I am unable to display the data received through the autocomplete functionality within the Grid. I would appreciate any suggestions to resolve this issue.

The code structure related to the problem I mentioned above is as follows.

@(Html.Kendo().Grid(Model.Lines)
    .Name("OrderLines")
    .ToolBar(tools => tools.Create().Text("Add new product"))
    .Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom))
    .Events(events => events
    .Change("onChange"))
    .Columns(columns =>
    {
        columns.Bound(p => p.Title)
        .ClientTemplate("#= Title #" +
        "<input type='hidden' name='Lines[#= index(data)#].Title' value='#= Title #' />")
        .EditorTemplateName("ProductTitleAutoComplete");

        columns.Bound(p => p.Title).Hidden().ClientTemplate("#= Title #" +
        "<input type='hidden' name='Lines[#= index(data)#].Title' value='#= Title #' />"
        );

        columns.Bound(p => p.Description).ClientTemplate("#= Description #" +
        "<input type='hidden' name='Lines[#= index(data)#].Description' value='#= Description #' />"
        );

        columns.Bound(p => p.Quantity).ClientTemplate("#= Quantity #" +
        "<input type='hidden' name='Lines[#= index(data)#].Quantity' value='#= Quantity #' />"
        );

        columns.Bound(p => p.UnitPrice).ClientTemplate("#= UnitPrice #" +
        "<input type='hidden' name='Lines[#= index(data)#].UnitPrice' value='#= UnitPrice #' />"
        );

        columns.Bound(p => p.TaxRate).ClientTemplate("#= TaxRate #" +
        "<input type='hidden' name='Lines[#= index(data)#].TaxRate' value='#= TaxRate #' />"
        );

        columns.Bound(p => p.DiscountRate).ClientTemplate("#= DiscountRate #" +
        "<input type='hidden' name='Lines[#= index(data)#].DiscountRate' value='#= DiscountRate #' />"
        );

        columns.Bound(p => p.PurchaseOrderId).Hidden().ClientTemplate("#= PurchaseOrderId #" +
        "<input type='hidden' name='Lines[#= index(data)#].PurchaseOrderId' value='#= PurchaseOrderId #' />"
        );

        columns.Bound(p => p.ProductId).Hidden().ClientTemplate("#= ProductId #" +
        "<input type='hidden' name='Lines[#= index(data)#].ProductId' value='#= ProductId #' />"
        );

        columns.Bound(p => p.Id).Hidden().ClientTemplate("#= Id #" +
        "<input type='hidden' name='Lines[#= index(data)#].Id' value='#= Id #' />"
        );

        columns.Bound(p => p.MeasureWeightId).ClientTemplate("#= MeasureWeightId #" +
        "<input type='hidden' name='Lines[#= index(data)#].MeasureWeightId' value='#= MeasureWeightId #' />"
        );

        columns.Command(command => command.Destroy()).Width(100);
    })
    .DataSource(dataSource => dataSource.Ajax()
    .Model(model =>
    {
        model.Id(p => p.ProductId);
        model.Field(p => p.ProductId).Editable(false);
    })
    .ServerOperation(false)
    ))

function onChange_ProductAutoComplete(e) {
    var dataItem = e.sender.dataItem(0);

    var grid = $("#OrderLines").data("kendoGrid");

    if (dataItem) {
        var el = $(e.sender.element[0]);
        const parent = el.closest("td");
        const inputs = parent.siblings().find('input');

        $(inputs).each(function () {
            var name = $(this).attr('name');
            if (name.endsWith("Description")) {
                $(this).val(dataItem.Notes);
            } else if (name.endsWith("ProductId")) {
                $(this).val(dataItem.Id);
            }
            else if (name.endsWith("Title")) {
                $(this).attr({ value: dataItem.Title });
                $(this).val(dataItem.Title);
            }
            else if (name.endsWith("MeasureWeightId")) {
                $(this).val(dataItem.MeasureWeightId);
            }
        });
    }
}

function onReadDataOnGrid_ProductAutoComplete(e) {
    let data = {
        title: $('#Title_ProductAutoComplete').val()
    };

    return data;
}

Thank you in advance for your support.

Selman
Top achievements
Rank 1
 asked on 18 Mar 2024
0 answers
11 views

I had a request to change the filtering of a certain column from "Starts With" to use a multi-select checkbox type filter to facilitate selecting 5-10 random items.  Then of course some other users prefer the "Starts With" type of filtering.  My solution is to have dual columns for that particular field, one with each filter type.  

Since my grids save user preferences in local storage between sessions, the users can hide whichever column has the filtering they don't prefer and just use the other one.  When they reload the page, their choice of column persists and their filtering is how they like it.

Darron

 

 

Darron
Top achievements
Rank 1
 asked on 18 Mar 2024
0 answers
11 views
Hi 
in my asp.net MVC page i have kendogrid with multiple rows and each row has a datetimepicker. with current modern type component i need to scroll for hours and minutes selection. but we want flat grid for hours ( 0 to 23) and minutes (0 to 59) for selection just like radtelerickdatetime picker in asp.net webforms. is there any template or customization possible for MVC page datetimepicker
Sushma
Top achievements
Rank 1
 asked on 11 Mar 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?