Hello,
If I use my own Popup Edit Template in Kendo grid with i.e @(Html.EditorFor(m => m.Aktuell)) then I see a normal
Checkbox (see Picture1) - if I use @(Html.Kendo().CheckBoxFor(m => m.Aktuell)) I see the Kendo Checkbox (see picture2)
It seems that using Html.EditorFor in grid Popup Edit Template do not use the Editor templates in Views\Shared\EditorTemplates\?
robert
I am trying to dynamically add change event to dropdownlist like
$("#ID").data("kendoDropDownList").bind("MyChangefunction", onChange);
but I get
Uncaught ReferenceError: onChange is not defined
what is onChange and where is defined?Hi,
how can I set a check selector inside row, like Gmail does, and a check selector for select all rows at a time?
Thanks!
I have a column with combobox as editor template. If I type name, it'll select the item and update the model when lost focus. But if I mouse click on an item, it will blank the field.
column binding:
columns.Bound(c => c.ServiceCompany).EditorTemplateName("SharedNameComboBox");
template:
<
script
>
function onSelect(e) {
e.sender.value(e.dataItem);
e.sender.trigger("change");
}
</
script
>
@(
Html.Kendo().ComboBox()
.HtmlAttributes(new { data_bind = "value: " + ViewData.TemplateInfo.HtmlFieldPrefix})
.Name(ViewData.TemplateInfo.HtmlFieldPrefix)
.Filter(FilterType.StartsWith)
.Suggest(true)
.BindTo(ViewData as IEnumerable<
string
>)
.Events(e => e.Select("onSelect"))
)
How can I update model upon mouse-click?
We are trying to export all pages of a grid to a pdf, but only the displayed page is exported to the pdf. The problem seems to be linked to using PaperSize, since it works when we remove it, but then we see the pager on each page. Here is the code we are using for the export :
.Pdf(pdf => pdf
.AllPages()
.AvoidLinks()
.PaperSize("A4")
.Margin("2cm", "1cm", "1cm", "1cm")
.RepeatHeaders()
.TemplateId("page-template")
.FileName("store.pdf")
.Scale(0.8)
.ForceProxy(true)
.ProxyTarget("_blank")
.ProxyURL(Url.Action("ExportToPdf", "Reports"))
I'm using the UI for MVC Core (Core 1.1). I need to allow users to build their own input forms (unlimited number of inputs and forms). I am storing the configuration of the form (e.g. settings for combobox, dateinput, textbox, etc.) in a database. I want to create the necessary mvc wrappers and save them to a file (or db)...i.e. cache the form. That way when the form is requested, I can just load the cached form. Here is an example of what I would store in a file or database.
@(Html.Kendo().NumericTextBox<
decimal
>().Name("currency").Format("c"))
@(Html.Kendo().NumericTextBox<
decimal
>().Name("currency2").Format("c").Value(50))
Is it possible to then load this information from database or file and have it parsed on a page (i.e. generate the kendo controls)?Or do the wrappers have to be added to the page at design time? If possible, how would I load the file?
Or do I need to create the Kendo html elements instead like below? Or is there another option?
<
input
id
=
"currency"
type
=
"number"
/>
<
input
id
=
"currency2"
type
=
"number"
value
=
"50"
/>
<
script
>
$(document).ready(function() {
$("#currency").kendoNumericTextBox({format: "c"});
$("#currency2").kendoNumericTextBox({format: "c"});
});
</
script
>
Hi, I set up a project which I build and run fine on Windows. When I bring it over to ubuntu and try to build, I have these errors
error CS1061: 'IServiceCollection' does not contain a definition for 'AddKendo' and no extension method 'AddKendo' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
error CS1061: 'IApplicationBuilder' does not contain a definition for 'UseKendo' and no extension method 'UseKendo' accepting a first argument of type 'IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
csproj file
<
Project
Sdk
=
"Microsoft.NET.Sdk.Web"
>
<
PropertyGroup
>
<
TargetFramework
>netcoreapp1.1</
TargetFramework
>
</
PropertyGroup
>
<
ItemGroup
>
<
PackageReference
Include
=
"Microsoft.AspNetCore"
Version
=
"1.1.1"
/>
<
PackageReference
Include
=
"Microsoft.AspNetCore.Mvc"
Version
=
"1.1.2"
/>
<
PackageReference
Include
=
"Microsoft.AspNetCore.StaticFiles"
Version
=
"1.1.1"
/>
<
PackageReference
Include
=
"Microsoft.Extensions.Logging.Debug"
Version
=
"1.1.1"
/>
<
PackageReference
Include
=
"Microsoft.VisualStudio.Web.BrowserLink"
Version
=
"1.1.0"
/>
<
PackageReference
Include
=
"Telerik.UI.for.AspNet.Core"
Version
=
"2017.2.504"
/>
</
ItemGroup
>
</
Project
>
Startup.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace TelerikAspNetCore
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
services.AddKendo();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseDeveloperExceptionPage();
app.UseStaticFiles();
app.UseKendo(env);
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
}
}
Hi
How do insert a DropDownList within a PanelBar?
I have the following code but it does not work:
I'm using version 2017.1.118
Thanks!
@(Html.Kendo().PanelBar()
.Name("panelForm")
.ExpandMode(PanelBarExpandMode.Single)
.Items(panelbar =>
{
panelbar.Add().Text("My Teammates")
.Expanded(true)
.Content(@<
text
>
@(Html.Kendo().DropDownList()
.Name("size")
.BindTo(new List<
string
>()
{
"S - 6 3/4\"",
"M - 7 1/4\"",
"L - 7 1/8\"",
"XL - 7 5/8\""
})
.HtmlAttributes(new { style = "width: 100%" })
.Deferred()
)
</
text
>);
})
.Deferred()
)