
I have a grid with foreign key columns
columns.ForeignKey(c => c.LanguageID, (System.Collections.IEnumerable)ViewData["languages"], "Id", "Description").Title("Language").Width(200);I want to get the text value of the foreign key drop down value ie: English in this case for selected rows.
I can Iterate selected rows and get the dataItem grid.select().each(function () {
var dataItem = grid.dataItem($(this));
console.log(dataItem);
});
is there an easy way to read the description?
Thanks
Dear sirs, I can't get a result.
As you can see, the first value for (01.01.2021) is located in the middle of first step.
Can you help me guess please, how should I configure the chart to bring the 01.01.2021 with it's value (0) right to the zero level of X line?
I'd like the chart values move left in a half of the cell step.

Greetings. I am getting the following error while uploading a file with Kendo upload. Code works fine at local. But it gives this error on the server.
Error:
Client-Side Code:
$("#batchFile").kendoUpload({
async: {
saveUrl: '/DijitalArsiv/UploadFile/',
autoUpload: false
},
upload: function (e) {
if (uploadFileNode.isMainFolder) {
realPath = realPath + "\\" + personelID
}
e.data = { "id": uploadFileNode.id, "path": realPath, "isMainFolder": uploadFileNode.isMainFolder, "type": uploadFileNode.spriteCssClass };
},
select: function (e) {
if (e.files.length != 0) {
$.each(e.files,function (index, value) {
var filtredValue = acceptedFileTypes.filter(x => x == value.extension)
if (filtredValue.length == 0) {
e.preventDefault();
$("#message-alert").html("Sadece '.pdf', '.jpg', '.png', '.jpeg', '.docx', '.xlsx' türünde dosyalar yükelenebilir. Lütfen yüklediğiniz dosyların türünü kontrol edin.")
kendoWindowMessageAlertModal.data("kendoWindow").content($("#message-alert").html()).center().open();
}
})
}
},
success: function (e) {
if (e.response.Status) {
getTreeView().append([{ id: e.response.ID, text: e.response.FileName, spriteCssClass: e.response.Type, UnicParentCode: nodeToUploadParent.UnicParentCode, isDraggable: true, isDroppable: true, hasChildren: false, isEditable: false, isMainFolder: false }], nodeToUpload)
updateBackupTree();
} else {
e.preventDefault();
}
},
multiple: true,
batch: true,
localization: {
cancel: "İptal",
dropFilesHere: "Dosyalarınızı Buraya Sürükleyebilirsiniz!",
remove: "Sil",
retry: "Tekrar Dene!",
select: "Dosya Seç",
statusFailed: "Yükleme Başarısız!",
statusUploaded: "Yükleme Başarılı!",
statusUploading: "Yükleniyor...",
uploadSelectedFiles: "Yükle"
}
});
Server-side Code:
[HttpPost]
public JsonResult UploadFile(HttpPostedFileBase batchFile, int? id, string path, bool isMainFolder,string type)
{
}
Hello, I'm currently working on a project for my company and ive encountered a problem. I dont know why I cant download the file attachment. ive attached a jpg file of the screenshot for you to see. There is a file attachment named sad kermit(2).jpg and a message in the console in the screenshot
This is my kendo form code in view.
$("#form").kendoForm({
validatable: { validationSummary: true },
orientation: "horizontal",
formData: {
ID: "@Model.ID",
IssueNumber: "@Model.ISSUE_NUM",
Title: "@Model.TITLE",
Environment: "@Model.ENVIRONMENT",
Application: "@Model.APPLICATION",
Module: "@Model.MODULE",
Priority: "@Model.PRIORITY",
Status: "@Model.STATUS",
FID: "@Model.FID",
Jobname: "@Model.JOBNAME",
Username: "@Model.USERNAME",
MantisNumber: "@Model.MANTIS_NO",
ModifiedBy: "@ViewBag.User_Name",
Upload: "",
ModifiedDate: "@Model.MODIFIED_DATE",
Description: "@Model.DESCRIPTION",
IssueType: "@Model.ISSUE_TYPE",
IssueCategory: "@Model.ISSUE_CATEGORY",
IssueResolution: "@Model.ISSUE_RESOLUTION",
Remarks: "@Model.REMARKS",
AssignedTo: "@Model.ASSIGNED_TO",
CreatedBy: "@ViewBag.User_Name"
},
items: [{
type: "group",
label: "Edit Issue Details",
items: [
...,
...,
...,
...,
...,
...,
...,
...,
...,
...,
...,
{
field: "Upload",
label: "Upload File:",
editor: function (container, options) {
$("<input name='files' id='files' type='file' aria-label='files' />").appendTo(container).kendoUpload({
async: {
saveUrl: '@Url.Action("UploadFiles", "Issue")',
removeUrl: '@Url.Action("RemoveFiles", "Issue")',
autoUpload: true
},
files: uploads
});
}
},
...,
...,
...,
...,
...,
...,
...,
...,
]
}],
submit: function (ev)...
});this is the code I use to try to download the file attachment in the same view but it isnt working I guess
$(".k-file").click(function (e) {
var filename = $(this).find(".k-file-name").html();
$.ajax({
type: "POST",
data: { "name": filename },
url: "/Issue/DownloadFile",
success: function (res) {
if (res.Success) {
console.log(res.DownloadUrl);
window.open(res.DownloadUrl, '_blank');
}
}
});
});[HttpPost]
public ActionResult DownloadFile(string name)
{
var folderName = Session["IssueNum"] as string;
string fileDirectory = Path.Combine(System.Web.HttpContext.Current.Request.PhysicalApplicationPath, "App_Data", folderName, name);
return Json(new
{
Success = true,
DownloadUrl = fileDirectory
}, JsonRequestBehavior.AllowGet);
}
One of my TreeList field is an array. For example:
var localData = [
{ id: 1, name: "A Team", description: "", players: ["a","b"], parentId: null },
{ id: 2, name: "Team Lead", description: "", players: ["c"], parentId: 1 }
];
The "players" field is an array. I configure the column like:
columns: [
{ field: "name", title: "Team", width: "350px" },
{ field: "description", title: "Description", width: "350px" },
{
title: "Players",
template: '{{ dataItem.players }}'
}]
However, the "Players" column shows like
["a","b"]
I expect it as
a, b
How do I fix it?
Thanks,
Is there a way to filter the JSON data saved in the spreadsheet out of cells that are not filled with data but contain Spaces

Hello
I'm using an editable GRID with CREATE toolbar. I would like to customise my editable pop-up to add a kendoDropDownList for selecting a element in a list.
In my exemple I have a grid with "accessoires" I can ADD new one or DELETE existing ones
If I create I want to choose the new element in a kendoDropDownList NOT in TYPE=INPUT
How to do this ?
Here is the code of my GRID
//Grille des accessoires
$("#gvAccessoires").kendoGrid({
columns: [
{
field: "LibelleObj",
title: "Accessoire"
},
{ command: [{ name: "destroy", text: "Supprimer", visible: function (dataItem) { return !dataItem.IsPublie } }], title: " ", width: "250px" },
],
editable: {
mode: "popup",
window: {
title: "Saisie des accessoires",
width: 600
}
},
toolbar: ["create"],
edit: function (e) {
???? how to add here the kendoDropDownList
},
save: function (e) {
Accessoires.add(new Accessoire(false, e.model));
},
remove: function (e) {
_.forEach(selectedOP.Accessoires, function (item) {
if (item.idObj == e.model.idObj) Accessoires.remove(item);
});
}
});
var ds3 = new kendo.data.DataSource({
data: Accessoires,
schema: {
model: {
id: "idObj",
fields: {
id: { editable: false, nullable: true },
LibelleObj: { validation: { required: true } },
}
}
}
});
$("#gvAccessoires").data("kendoGrid").setDataSource(ds3);
Thank you
Hi,
I have tried this every way I can think of. I am having problems with setting data-bind while iterating an array.
Made a small demo below, the actual code is much more complex and that is the reason I need to use the for loop in order to get the correct result.
How can I set the data-bind property on the input correctly?
<div id="container">
<div id="weekdays" data-template="weekday" data-bind="source : this"></div>
</div>
<script id="weekday" type="text-x-kendo-template">
<div>
# for (i = 0; i < data.lines.length; i++) { #
<h2>#: data.lines[i].day #</h2>
<input type="text" data-bind="value: data.lines[i].quantity" />
# } #
</div>
</script>
<script>
$(document).ready(function () {
var vm = kendo.observable({
lines: new kendo.data.ObservableArray([
{ id: 123, day: "Monday", quantity: 5 },
{ id: 322, day: "Tuesday", quantity: 2 }
])
});
kendo.bind($("#container"), vm);
});
</script>Hi,
Is there a way to auto align the cell width/height when double clicking on the cell header similar to what we have in excel?
1. Text is hidden due to cell width
2. Double click on the header line to auto align and show the full text.
Thanks in advance.