Telerik Forums
UI for ASP.NET MVC Forum
1 answer
165 views

ClientGroupHeaderColumnTemplate prefers "data.FIELDNAME.sum" to "aggregates.FIELDNAME.sum" when using more than 7 aggregates.  < 7 aggregates, either one works.  Adding an 8th aggregate = "no bueno".

I kept getting an error on grouping if I added an 8th aggregate.  With 7 or less aggregates, there didn't seem to be a problem.

I changed my ClientGroupHeaderColumnTemplate to use "data.FIELD.sum" instead of "aggregates.FIELD.sum" and the problem went away, but the problem seems to only exist after the 7th aggregate.

I'm not using all of the aggregates in the same ClientGroupHeaderColumnTemplate.  Just adding a new line in the datasource to enable an aggregate on another column (> 7) triggered the fail.

If someone can advise what I might be doing wrong (other than using excessive aggregates), please advise.

Georgi
Telerik team
 answered on 07 May 2021
1 answer
276 views

Hi guys,

 

My project is aimed to record employee registration. I want to add a grid into my project.

Link: ASP.NET MVC Grid Batch editing Demo | Telerik UI for ASP.NET MVC

But I check my reference which is missing Kendo.Mvc.Examples.

In the demo project (location: C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC R1 2021\wrappers\aspnetmvc\Examples\MVC5\Kendo.Mvc.Examples), Kendo.Mvc.Examples is in the reference (under Kendo.Mvc).

Could you tell me how to add this reference into my project? Or is there any other document can help me develop the Grid.

 

Thanks,

Mike

Aleksandar
Telerik team
 answered on 03 May 2021
1 answer
126 views
This is a problem that has existed for years, are actions currently being taken to solve it or is there a version where it is solved?
Stoyan
Telerik team
 answered on 29 Apr 2021
12 answers
148 views

Hi All,

 

When I want to add Scrollable menu, I meet this issue, Please Help me!

The item need to add: ASP.NET MVC Menu Scrollable Demo | Telerik UI for ASP.NET MVC

I just create an new project (Kendo UI MVC5 Application) and I want to a scrollable navigation menu.

After I copy and paste the code from menu demo, the menu is show up but it isn't scrollable.

I screenshot the issue(when mouse move to "Men", nothing show up)

I put these code in index.cshtml which is under Home folder

    <div class="k-content">
    <h4>Horizontal</h4>

    @(Html.Kendo().Menu()
            .Name("horizontalMenu")
            .Scrollable(true)
            .Items(items =>
            {
                items.Add()
                    .Text("Mens")
                    .Items(children =>
                    {
                        children.Add().Text("Jackets and Coats");
                        children.Add().Text("Jeans");
                        children.Add().Text("Knitwear");
                        children.Add().Text("Shirts");
                        children.Add().Text("Belts");
                        children.Add().Text("Socks");
                        children.Add().Text("Fan Zone");
                    });

                items.Add()
                    .Text("Ladies")
                    .Items(children =>
                    {
                        children.Add().Text("Jackets and Coats");
                        children.Add().Text("Jeans");
                        children.Add().Text("Knitwear");
                        children.Add().Text("Shirts");
                        children.Add().Text("Belts");
                        children.Add().Text("Socks");
                        children.Add().Text("Fan Zone");
                    });

                items.Add()
                    .Text("Kids")
                    .Items(children =>
                    {
                        children.Add().Text("Jackets and Coats");
                        children.Add().Text("Jeans");
                        children.Add().Text("Knitwear");
                        children.Add().Text("Shirts");
                        children.Add().Text("Belts");
                        children.Add().Text("Socks");
                        children.Add().Text("Fan Zone");
                    });

                items.Add()
                    .Text("Sports");
                items.Add()
                    .Text("Brands");
                items.Add()
                    .Text("Accessories");
                items.Add()
                    .Text("Promotions");
                items.Add()
                    .Text("Contacts");
                items.Add()
                    .Text("About us");
            })
          )

</div>
<style>
    .k-menu-scroll-wrapper.horizontal li.k-item.k-last {
        border-right-width: 0;
    }
</style>

 

And I didn't change anything in HomeController.cs:

   using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Work_Time_Record.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }
    }
}

Is there any issue about controller? I'm new in ASP.Net MVC, Please let me know if need more information!

 

Thanks a lot,

Mike

Mike
Top achievements
Rank 1
Iron
Iron
 answered on 28 Apr 2021
10 answers
4.9K+ views
I could not find any documentation how to submit hidden field via form control.
Frans
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Apr 2021
5 answers
1.3K+ views

Hi, 

I feel like I may be missing something, but like my title says, my grid is not populating with data after the read function. Here is my code:

// grid

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
</head>
<body>
    <div>
        @(Html.Kendo().Grid<DataManager.Models.CommodityCodesViewModels.IndexViewModel>()
      .Name("commodityCodesGrid")
      .Columns(columns =>
      {
          columns.Bound(c => c.CommodityCodeId).Width(100);
          columns.Bound(c => c.CommodityCode).Width(100);
          columns.Bound(c => c.Description).Width(100);
      })
    .HtmlAttributes(new { style = "height: 700px;" })
    .Scrollable(s => s.Height(700))
    .Groupable()
    .Sortable()
    .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(true)
        .ButtonCount(5))
    .Filterable()
    .DataSource(dataSource => dataSource
        .Custom()
        .Batch(true)
        .PageSize(20)
        .Schema(schema => schema.Model(m => m.Id(p => p.CommodityCodeId)))
        .Transport(transport =>
        {
            transport.Read(read =>
               read.Url("http://localhost:51088/api/commoditycodes")
                   .DataType("jsonp")
            );
        })
    )
)
    </div>
</body>
</html>

 

// View Model

public class IndexViewModel
{
    public int CommodityCodeId { get; set; }
    [Required, MaxLength(3)]
    public string CommodityCode { get; set; }
    [Required, MaxLength(50)]
    public string Description { get; set; }
}

 

I have also attached two screenshots. One illustrates the returned data via the corresponding url, and the other shows the response when testing the grid. 

Thanks,

Ruben

serge
Top achievements
Rank 2
Bronze
Iron
Iron
 updated answer on 27 Apr 2021
1 answer
348 views

Hello

How can I make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager?

This is my problem:

When I browse to an empty folder, the folder gets reloaded every time I go into the folder.

When I browse to a folder that has files, the folder gets reloaded the first time and afterwards it won't reload/refresh anymore.

Practical case:

- Root
     - FolderA
          - File1
          - File2
     - FolderB

- If I go to FolderA, it will load both files
- When I drag File1 into FolderB, if I go to FolderB I will see the File1 inside
- I go back to FolderA and I drag File2 into FolderB
- If I go to FolderB I can only see File1 inside, FolderB was not reloaded when I went there again

The only 2 ways I found so far to see File2 inside of FolderB are:
- refreshing the whole page
- moving File1 again to another folder, when I do that File2 becomes visible again (a refresh is made);

The second way only happeens because I do a $("#FileManager").data("kendoFileManager").refresh(); but this only refreshes the folder I am currently at.

I would like to make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager.

Ianko
Telerik team
 answered on 27 Apr 2021
1 answer
148 views

Hi,

 

I have an issue with the Editor control where copy/pasting content with & into the "View HTML" tool window is converting the & to &amp. I've reproduced this behaviour in a pared down version of one of the jQuery demos here

Steps to reproduce:

- Click the View HTML button and copy/paste the following "<a href="https://clk.omgt1.com/?AID=1749609&PID=32811&UID=--MembershipNumber--" target="_blank" rel="noopener">"

- Click the Update button to save the change

- Click the View HTML button again and you can see that the content has been changed to this (emphasis mine to show the differences) - <a href="https://clk.omgt1.com/?AID=1749609&amp;PID=32811&amp;UID=--MembershipNumber--" target="_blank" rel="noopener"></a>

 

I've looked through the documentation and found the option for "encoded" which seems related but setting that to false doesn't fix this problem. Since this problem was originally reported via someone copy/pasting content into the window I've also tried modifying the paste options without success but I can also reproduce this via typing the problematic content in myself so copy/pasting doesn't seem related here.

 

Is there some other option that controls this behaviour or is it a bug with the control?

Neli
Telerik team
 answered on 27 Apr 2021
5 answers
607 views

I have created a grid to show a list of employees. The grid columns are filterable and I have set an initial IsLeaver filter on the data source to only show non-leavers. The problem I have is the suggestion operator is not initially showing all the results I would expect.

For example "LocationA" does not show up as a suggestion when initially trying to type this into the location filter. However, when I press enter their are lots of rows with "LocationA" that show up in the grid.  I am using "contains" for both the operator and suggestion operator so they should be the same.

If I clear the IsLeaver filter in the browser and then set it back to the same value then "LocationA" will start appearing in the suggestions operator.

If I do not set an initial IsLeaver filter and just set the filter in the browser then "LocationA" correctly appears in the suggestions operator.

@(Html.Kendo().Grid(Model)
 .Name("EmployeeDataGrid")
 .Columns(columns =>
 {
    columns.Bound(p => p.ID).Filterable(f => f.Cell(c => c.ShowOperators(false).Operator("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.Name).Filterable(f => f.Cell(c => c.ShowOperators(false).Operator("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.Location).Filterable(f => f.Cell(c => c.ShowOperators(false).Operatord("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.IsLeaver);
})
.Pageable()
.Sortable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.DataSource(dataSource => dataSource
    .Ajax()
    .ServerOperation(false)
    .Filter(f => f.Add(p => p.IsLeaver).IsEqualTo(false))))

 

Any suggestions as to why "LocationA" is not initially showing up in suggestion operator when there are definitely rows for "LocationA" that are not leavers. I can see these rows when I apply the filter so I can't understand why "LocationA" does not appear in the suggestion operator. 

Andrew
Top achievements
Rank 1
 answered on 26 Apr 2021
1 answer
605 views

The code below is within a poup editor when user click the EDIT button in a row of a grid.

I want to handle when autocomplete field changed.

I added .Events(e => e.Change("autocomplete_change")) in the wrapper and add a javascipt function autocomplete_change() after the wrapper 

when run it and click one of the edit button in a grid row, I got autocomplete_change is not defined error and  the popup will show under the grid without any data.

Is there anyone could help me to let me know how to fix it and  what's going on.

thank you very much.

@(Html.Kendo().AutoCompleteFor(model => model.AnswerA)
                .Name("AnswerA")
                .DataTextField("Answer")
                .Placeholder("Type a answer")
                .Filter("Contains")
                .MinLength(5)
                .HtmlAttributes(new { style = "width:100%" })
                .Height(520)
                .Events(e => e.Change("autocomplete_change"))
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("ResponseRead", "Method")
                            .Data("onAnswerAData");
                    })
                    .ServerFiltering(true);
                })
              
            )
            <script>
                 function autocomplete_change() {
                       alter("call ShowAddingAnswerPrompt");
                    }
            </script>

Ivan Danchev
Telerik team
 answered on 26 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?