Telerik Forums
UI for ASP.NET Core Forum
1 answer
105 views

Hi,

 

I have a chart displaying the number of firm and speculative hours (area series). To do this, I retrieve my data from my controller and apply a grouping on the type (firm or speculative) and display stacked series using:

series.Area(model => model.Loe).Name("#= group.value #").CategoryField("YearMonth").Stack(true);

 

All work well but now, I want to add a new series displaying the work force(Data come from the same source) using:

series.Line(model => model.Capacity).Name("Capacity").CategoryField("YearMonth").Aggregate(ChartSeriesAggregate.Sum);

 

but the new series are added for each group. What I want is the new series appears only 1 times not for each group.

How I can do this?

 

Sylvain

Tsvetina
Telerik team
 answered on 13 Feb 2018
5 answers
411 views

.NET Core 2.0 MVC Application; Telerik UI for AspNet Core & Kendo UI 2017.3.1116

I am following the example posted at http://demos.telerik.com/aspnet-core/editor/imagebrowser

The control is able to read, create a folder, and delete but I cannot upload an image or file.  The error returned in the alert is, "Error! The requested URL returned 500 - ".  This is in debug mode in Visual Studio 2017.  I checked IIS Express log files and system events which give no additional information.

The system response title is, "<h1>An unhandled exception occurred while processing the request.</h1>
            <div class="titleerror">MissingMethodException: Method not found: &#x27;Microsoft.Net.Http.Headers.ContentDispositionHeaderValue Microsoft.Net.Http.Headers.ContentDispositionHeaderValue.Parse(System.String)&#x27;.</div>
                <p class="location">Kendo.Mvc.UI.FileBrowserController.GetFileName(IFormFile file)</p>"

This leads me to believe this is an issue in Core 2.0 compatibility with the way the IFormFile interface is implemented internally in the Kendo.Mvc.UI.EditorImageBrowserController class.

 

 

 

Dimitar
Telerik team
 answered on 12 Feb 2018
1 answer
98 views

I've attempted to install Telerik DevCraftUltimateSetup_b_2017_4_1204_0 a couple of times.  The second time I left it on over night and it seems to hang on my Windows 7 machine (with VS 2017).  Is there any work around to this.  I even went so far as to install only one component (ASP>NET CORE) and it seems to have hung up even on this install.

 

Any help would be appreciated.

Michael
Top achievements
Rank 1
 answered on 11 Feb 2018
6 answers
1.1K+ views

So I have an issue where if there are two grids on the same page using different names and both having a column that uses the ".Select()" method for checkboxes, the "select all" checkbox in the header of one of the grids works correctly, but the second one will only select the first one's rows and not it's own.

Here is some sample code:

<div class="row">
        <div class="col-xs-12 col-md-6">
            <h2 class="text-center">Users in rule</h2>
            @(Html.Kendo().Grid<UserViewModel>()
                .Name("UsersInRule")
                .Columns(columns =>
                {
                    columns.Select().Width(50);
                    columns.Bound(c => c.Name).Width(300);
                    columns.Bound(c => c.Username).Width(200);
                })
                .Sortable()
                .Resizable(resize => resize.Columns(true))
                .ToolBar(toolbar => toolbar.Create())
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Read(read => read.Action("ListUsersInRule", "User", new { Area = "Admin", id = Model.Id }))
            )
            )
        </div>
        <div class="col-xs-12 col-md-6">
            <h2 class="text-center">Available users</h2>
           @(Html.Kendo().Grid<UserViewModel>()
                .Name("AvailableUsers")
                .Columns(columns =>
                {
                    columns.Select().Width(50);
                    columns.Bound(c => c.Name).Width(300);
                    columns.Bound(c => c.Username).Width(200);
                })
                .Sortable()
                .Resizable(resize => resize.Columns(true))
                .ToolBar(toolbar => toolbar.Create())
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Read(read => read.Action("ListUsersNotInRule", "User", new { Area = "Admin", id = Model.Id }))
            )
        )
        </div>
    </div>

 

 

What happens is when I click on the header checkbox for the "AvailableUsers" grid, it will select the rows in the "UsersInRule" grid. The header checkbox in the "UsersInRule" grid works just fine in selecting rows in its own grid. How do I configure it so that the header checkboxes will only select the rows in their own grid?

Currently using Kendo UI v2017.3.1026 (kendo.all.min.js and kendo.aspnetmvc.min.js) that I grabbed from the telerik.ui.for.aspnet.core commercial zip.

Stefan
Telerik team
 answered on 09 Feb 2018
1 answer
893 views

Hi,

I have defined my Spreadsheet as follows:

@(Html.Kendo().Spreadsheet()
    .Name("spreadsheet")
    .Sheets(sheets =>
    {
        sheets.Add()
            .Name("mySheet")
            .Columns(c =>
            {
                c.Add().Width(150);
                c.Add().Width(150);
            })
            .DataSource<MyViewModel>(ds => ds
                .Ajax()
                .Batch(true)
                .Read("ReadTimeSeries", "MyController")
                .Model(m => {
                    m.Field(p => p.Timestamp);
                    m.Field(p => p.Value);
                })
            );
    })
    .Sheetsbar(false)
)

When the Spreadsheet loads the data, it is displayed as Date only - the time part seems to be missing.

This is my DataModel:

    public class MyViewModel
    {
        [Display(Name = "Zeitstempel")]
        [DisplayFormat(DataFormatString = "{0:dd.MM.yyyy HH:mm}"]
        public DateTime Timestamp { get; set; }

        [Display(Name = "Wert")]
        [DisplayFormat(DataFormatString = "{0:#,###.###}")]
        public decimal Value { get; set; }
    }

The DisplayFormatAttribute seems to be ignored. The Problem is that the count of the rows vary, so I can't predefine the format using Rows.Add().Cells(c => c.Add().Format("dd.MM.yyyy HH:mm").

 

How can I achieve the Timestamps to be displayed with date AND time?

Veselin Tsvetanov
Telerik team
 answered on 09 Feb 2018
1 answer
379 views
Hi, I'm trying to use the Kendo Notification widget to add error/success messages to my page. Currently I'm using modelstate errors to display a quick message but I want to switch over to the kendo widget. My issue is I want to be able to set the notification message from the server side in the controller. Is there any way to easily access the notification widget from my controller?
Plamen
Telerik team
 answered on 08 Feb 2018
2 answers
273 views

 

Hi there

da-DK is my culture name and I set the globalization correctly.I have a problem with NumericTextBox. My database field value is 4587.25.It is rendering expected in Firefox (4.587,25) and IE, but making a problem in Chrome (empty numeric textbox), I saw a warning in Chrome console.

The specified value "4587,25" is not a valid number.The value must match to the following regular expression:-?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?

How can I fix this chrome behavior? I built a small a project and added some code to generate the problem. Index.cshtml contains a extension method BeginForm2(), inside this method I wrote my code.Download

Thanks

Sabbir

khandokar
Top achievements
Rank 1
 answered on 07 Feb 2018
8 answers
1.3K+ views

Hello,

When I try to bind a NumericTextBox or a CurrencyTextBox to a decimal number, I get in the javascritpt console the following error:
"The specified value "2,5" is not a valid number. The value must match to the following regular expression: -?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?"

The problem seems to be because we use a comma to represent a decimal separator.
I set the culture kendo.culture.es-AR to my layout so the controls should support this.
Can I configure a number format for numeric controls in my proyect to accept a comma for decimal separator?

Thanks.

Stefan
Telerik team
 answered on 07 Feb 2018
2 answers
91 views

Hi,

In WebForms I could avoid changing the html i tags to em (and other tags).

In .net core I don't see a way to accomplish that.

Is it possible?

Thank you

 

Ricardo
Top achievements
Rank 1
 answered on 06 Feb 2018
1 answer
896 views

Does anyone have an example for the kendoDropdownList that uses the MVC Core tag helper, and uses local binding?  The tag helper sample in the demos binds to remote data only.  Thanks!

 

Dimitar
Telerik team
 answered on 06 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?