The main codes are as follows. When the treelist loaded, Always show alert once. Then click the custom toolbar button, Nothing do!
@(Html.Kendo().TreeList<Liwb.Entities.RulesAndRegulation>
()
.Name("Treelist")
.Toolbar(toolbar =>
{
toolbar.Custom().Name("cust").Text("Upload").Click("uploadfile()");
})
.Columns(columns =>
{
columns.Add().Field(f => f.Name);
columns.Add().Field(e => e.ReleaseUnit);
columns.Add().Field(e => e.ReleaseNumber);
columns.Add().Field(e => e.EffectiveDate).Format("{0:yyyy/M/d}");
columns.Add().Field(e => e.Type).Template("#: displayEnum(data)#");
columns.Add().Width(400).Command(c =>
{
c.CreateChild().Text("附件");
c.Edit();
c.Destroy();
}).HtmlAttributes(new
{
style = "text-align: center;"
});
})
.Editable()
.Scrollable(false)
.Filterable()
.DataSource(dataSource => dataSource
.ServerOperation(false)
.Model(m =>
{
m.Id(f => f.ID);
m.ParentId(f => f.PID);
m.Field(f => f.Name);
m.Field(f => f.Pos).DefaultValue(1);
m.Field(f => f.Type).DefaultValue(Liwb.Utility.RulesAndRegulationType.dc3);
})
.Create(create => create.Action("Create", "RulesAndRegulation"))
.Read(read => read.Action("Read", "RulesAndRegulation"))
.Update(update => update.Action("Update", "RulesAndRegulation"))
.Destroy(delete => delete.Action("Destroy", "RulesAndRegulation"))
)
.Height(540)
.Pageable(p => p.PageSize(15)
.PageSizes(true)
)
)
<script type="text/javascript">
function uploadfile() {
alert("My upload!");
}
</script>
how to bind this column to TextArea in asp.net core project in edit template
this my steps but it's not working
column.Bound(c => c.Note).EditorViewData("TextArea");
[UIHint("TextArea")]
public string Note
{
get;
set;
}
Views/Shared/EditorTemplates/TextArea.cshtml
@model string
@Html.TextAreaFor(m=>m, new { rows = 5})
Say I have a typical declaration like this:
@(Html.Kendo().ComboBox().Name("cb")
.DataTextField("Name")
.DataValueField("ID")
.DataSource(source => {
source.Read(read => {
read.Action("GetTest", "Home");
})
.ServerFiltering(true);
}).Events(e => e.Change("onCBChange"))
How does the syntax look for replacing that e.Change("onCBChange") with an anonymous function? I'm thinking something like this, but I can't seem to get it right
.Events(e => e.Change {
function(f) {
alert("here!");
} )
My computer screen is 14 inch, 2560x1440, when open the pdf file in AspNet core PDFViewer,
the font is fuzzy .
At the same time, the all FileDialog's font is fuzzy .
Is there a way to do this in code?
Thanks … Ed
I am trying to start a Asp.Net.Core 3.1 core project. I used the default Grid based project template. That all went off without a hitch. The default template delivers a workable starting project.
I then attempted to add my first view. Right clicked on item, selected "add VIew". The system responds with the message: "There was an error running the selected code generator: The local source "C:\Program Files (x86)\Progress\Telerik UI for ASP.NET Core R3 2019\wrappers\aspnetcore\Binaries\AspNet.Core" does not exist.
The message is accurate as the referenced path does not exist. My system has Telerik UI for ASP.NET Core R1 2020 not the referenced R3 2019 folder.
To the best of my knowledge my project has no reference other than 2020 versions. Effectively I am blocked from adding a view via the "add View" option. If I knew where that reference was I might be able to correct things.
Anyone have any ideas on what I am forgetting to do? I have tried all the options, partial view, use or do not use layout pages, reference or do not reference script pages, no option works.
I have a external popup tempate that is called from a button on the grid.
@model CIPHRChecks.Models.Order;
<div class="k-content popup-content">
<text><input data-bind="value: Service.Name" /></text>
@foreach (var item in Model.Service.ServiceAdditionalData)
{
<p>@item.DisplayName</p>
}
</div>
When I run the page it fails to load the Kendo Grid and I get the jscript error "Unexpected "</body>" or end of file. All open elements should be closed before the end of the document." This happens with any reference to the Model.
There is nothing wrong with the data provided to the grid. It has the collection I want to iterate through. The intellisense for Model.Service.ServiceAdditionalData all works.
Am I not supposed to use 'Foreach with Kendo or reference the model in this way. Should I use some other method to iterate through the collection and reference the data.
Hi
this JsFiddle Demo change this javascript line ( if (event.keyCode == 13) ) to ( if (event.keyCode == 40) )
then changes does not made after pressing down key arrow on keyboard.
i need help.
Thanx
I get the following error in the browser console when exporting to excel from the ASP.NET core spreadsheet control. This only happens on certain spreadsheet files and I am not sure what is causing it. Is there a way to get a more detailed error message?
kendo.all.js:12691 Uncaught TypeError: Cannot read property 'target' of undefined
at kendo.all.js:12691
at Array.map (<anonymous>)
at init.drawingsXML (kendo.all.js:12685)
at o.toZIP (kendo.all.js:13063)
at o.toBlob (kendo.all.js:13159)
at r (kendo.all.js:136510)
at kendo.all.js:136498
at XMLHttpRequest.n.onload (kendo.all.js:135962)
(anonymous) @ kendo.all.js:12691
drawingsXML @ kendo.all.js:12685
toZIP @ kendo.all.js:13063
toBlob @ kendo.all.js:13159
r @ kendo.all.js:136510
(anonymous) @ kendo.all.js:136498
n.onload @ kendo.all.js:135962
kendo.all.js:12691 Uncaught TypeError: Cannot read property 'target' of undefined
at kendo.all.js:12691
at Array.map (<anonymous>)
at init.drawingsXML (kendo.all.js:12685)
at o.toZIP (kendo.all.js:13063)
at o.toBlob (kendo.all.js:13159)
at r (kendo.all.js:136510)
at kendo.all.js:136498
at XMLHttpRequest.n.onload (kendo.all.js:135962)
(anonymous) @ kendo.all.js:12691
drawingsXML @ kendo.all.js:12685
toZIP @ kendo.all.js:13063
toBlob @ kendo.all.js:13159
r @ kendo.all.js:136510
(anonymous) @ kendo.all.js:136498
n.onload @ kendo.all.js:135962