ASP.NET Core 2018.2.516
Grid and menu
IIS Express
HTTP Error when I run.
Anyone else ?
I have a web application solution (mix of SL5, ASPX, HTML and some JS), it's primarily setup to start a Silverlight app, but I have a few .ASPX pages that is referenced from my Silverlight app and/or directly via IIS web server (the .ASPX pages are in the root of my web app).
I installed UI for ASP.NET core and was expecting to see all the Telerik controls show up when I open up the Toolbox sidebar window, but nothing showed up?
What am I missing?
Cheers, Rob.
I'm trying to use a template on my category axis labels using kendo for ASP.CORE. I tried the code snippet below and now the labels are blank even though my graph has values. I'm trying to accomplish this without building the grid via jquery, but it appears that all the support is on the jquery way of handling this. Is this possible for ASP.NET Core?
.CategoryAxis(axis => axis
.Labels(labels => labels
.Template(
"#= series.name #: #= value #"
)
)
I have a grid with a lot of data, when a user grabs the scroll bar and (for example) drags it 1/2 down the grid it makes multiple calls to the DB as that user drags past the paging size.
Is it possible to only read from the DB when the user stops scrolling so that there is only 1 read from the DB at the point they are looking at and the unnecessary reads that were scrolled past are never made?
Thanks,
Richard
Hello,
I ran into a problem with the Grid when starting a new project. It seems that a viewmodel can't contain a property named Model? If I have a viewmodel as such:
using System.ComponentModel.DataAnnotations;
namespace Lainalista.Models {
public class ToolViewModel {
public int ID { get; set; }
[MaxLength(100)]
public string Make { get; set; }
[MaxLength(100)]
public string Model { get; set; }
}
}
And then a Grid definition in a .cshtml file like this:
@(Html.Kendo().Grid<
ToolViewModel
>(new List<
ToolViewModel
>() { new ToolViewModel() { ID = 1, Make = "Makita" } })
.Name("toolsGrid")
.Columns(columns => {
columns.AutoGenerate(true);
})
.ToolBar(toolbar => toolbar.Create())
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.ID))
.Create(update => update.Action("EditingInline_Create", "Grid"))
.Read(read => read.Action("EditingInline_Read", "Grid"))
.Update(update => update.Action("EditingInline_Update", "Grid"))
.Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
)
)
Then I get an error and the page load is aborted:
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware:Error: An unhandled exception has occurred while executing the request
System.ArgumentException: The name of an HTML field cannot be null or empty. Instead use methods Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.Editor or Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1.EditorFor with a non-empty htmlFieldName argument value.
Parameter name: expression
at Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator.GenerateInput(ViewContext viewContext, InputType inputType, ModelExplorer modelExplorer, String expression, Object value, Boolean useViewData, Boolean isChecked, Boolean setId, Boolean isExplicitValue, String format, IDictionary`2 htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator.GenerateTextBox(ViewContext viewContext, ModelExplorer modelExplorer, String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.GenerateTextBox(ModelExplorer modelExplorer, String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.TextBox(String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.DefaultEditorTemplates.GenerateTextBox(IHtmlHelper htmlHelper, String inputType)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.DefaultEditorTemplates.StringTemplate(IHtmlHelper htmlHelper)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TemplateRenderer.Render()
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TemplateBuilder.Build()
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.GenerateEditor(ModelExplorer modelExplorer, String htmlFieldName, String templateName, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Editor(String expression, String templateName, String htmlFieldName, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperEditorExtensions.Editor(IHtmlHelper htmlHelper, String expression, String templateName, Object additionalViewData)
at Kendo.Mvc.UI.GridBoundColumn`2.GetEditor(IHtmlHelper helper, HtmlEncoder encoder)
at Kendo.Mvc.UI.Grid`1.<>c__DisplayClass66_1.<
InitializeEditors
>b__2(IGridBoundColumn column)
at Kendo.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action)
at Kendo.Mvc.UI.Grid`1.ProcessSettings()
at Kendo.Mvc.UI.WidgetBase.RenderHtml(TextWriter writer)
at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.WriteTo(TextWriter writer, HtmlEncoder encoder)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBuffer.<
WriteToAsync
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<
RenderLayoutAsync
>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<
RenderAsync
>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<
ExecuteAsync
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<
ExecuteAsync
>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewResult.<
ExecuteResultAsync
>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeResultAsync
>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeNextResultFilterAsync
>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeNextResourceFilter
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeFilterPipelineAsync
>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeAsync
>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<
Invoke
>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<
Invoke
>d__7.MoveNext()
Microsoft.AspNetCore.Server.Kestrel:Error: Connection id "0HLDVJR1TO7VG", Request id "0HLDVJR1TO7VG:00000001": An unhandled exception was thrown by the application.
System.ArgumentException: The name of an HTML field cannot be null or empty. Instead use methods Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.Editor or Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper`1.EditorFor with a non-empty htmlFieldName argument value.
Parameter name: expression
at Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator.GenerateInput(ViewContext viewContext, InputType inputType, ModelExplorer modelExplorer, String expression, Object value, Boolean useViewData, Boolean isChecked, Boolean setId, Boolean isExplicitValue, String format, IDictionary`2 htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator.GenerateTextBox(ViewContext viewContext, ModelExplorer modelExplorer, String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.GenerateTextBox(ModelExplorer modelExplorer, String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.TextBox(String expression, Object value, String format, Object htmlAttributes)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.DefaultEditorTemplates.GenerateTextBox(IHtmlHelper htmlHelper, String inputType)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.DefaultEditorTemplates.StringTemplate(IHtmlHelper htmlHelper)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TemplateRenderer.Render()
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TemplateBuilder.Build()
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.GenerateEditor(ModelExplorer modelExplorer, String htmlFieldName, String templateName, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Editor(String expression, String templateName, String htmlFieldName, Object additionalViewData)
at Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperEditorExtensions.Editor(IHtmlHelper htmlHelper, String expression, String templateName, Object additionalViewData)
at Kendo.Mvc.UI.GridBoundColumn`2.GetEditor(IHtmlHelper helper, HtmlEncoder encoder)
at Kendo.Mvc.UI.Grid`1.<>c__DisplayClass66_1.<
InitializeEditors
>b__2(IGridBoundColumn column)
at Kendo.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 instance, Action`1 action)
at Kendo.Mvc.UI.Grid`1.ProcessSettings()
at Kendo.Mvc.UI.WidgetBase.RenderHtml(TextWriter writer)
at Kendo.Mvc.UI.WidgetBase.ToHtmlString()
at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.WriteTo(TextWriter writer, HtmlEncoder encoder)
at Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBuffer.<
WriteToAsync
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<
RenderLayoutAsync
>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<
RenderAsync
>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<
ExecuteAsync
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<
ExecuteAsync
>d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewResult.<
ExecuteResultAsync
>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeResultAsync
>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeNextResultFilterAsync
>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeNextResourceFilter
>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeFilterPipelineAsync
>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<
InvokeAsync
>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<
Invoke
>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<
Invoke
>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<
Invoke
>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<
Invoke
>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<
Invoke
>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<
ProcessRequestsAsync
>d__2.MoveNext()
The error can, however be avoided by either commenting out the .Toolbar() line or changing the Model property to something else (like NotModel).
I have Two Grid in one razor page.
<kendo-grid name="DgMaster" selectable="true">
<datasource type="DataSourceTagHelperType.WebApi">
<transport>
<read url="@Url.Content("~/api/Master")"/>
</transport>
</datasource>
</kendo-grid>
<kendo-grid name="DgDetail">
<datasource type="DataSourceTagHelperType.WebApi">
<transport>
<read url="@Url.Content("~/api/Detail/001")"/>
</transport>
</datasource>
</kendo-grid>
I want when Master grid Row select changed, the detail grid datasource change. <read url="@Url.Content("~/api/Detail/001")"/> replace "001" to mater grid row data id.
I can get mater grid selected row data in javascript, the code as follow:
function DgMasterChange(e) {
var grid= $("#DgCategory").data("kendoGrid");
var row = grid.select();
var category = grid.dataItem(row);
}
I am trying to setDatasource in javascript. but setDatasource method doesn't work.
Please Help.