When using tagMode single, text appears how many items are selected. (2 item(s) selected).
How can I translate this text. I though that there would be some line in kendo.messages.de/fr ... But it is not.
I'm using the scheduler for only all-day items, and would like to sort items based off a given field (in this case a C# long value).
How would I go about doing this?
This is my current code:
@{
ViewBag.Title = $
"Profile Calendar"
;
}
<style>
/* increase the height of the cells in day, work week and week views */
.k-scheduler-table td,
.k-scheduler-table th {
height: 1em;
}
/* The following styles will work only with Kendo UI versions before 2020 R1 */
/* increase the height of the month view cells */
.k-scheduler-monthview .k-scheduler-table td {
height: 20em;
}
.k-event-template {
font-size: 0.75em;
width: 125px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<h2>@ViewBag.Title</h2>
<div id=
"scheduler"
></div>
<script>
$(
function
() {
$(
"#scheduler"
).kendoScheduler({
change:
function
(e) {
var
start = e.start;
var
end = e.end;
console.log(kendo.format(
"Selection between {0:g} and {1:g}"
, start, end));
},
edit:
function
(e) {
e.preventDefault(
true
);
window.location.href =
"@Url.Action("
View
", "
Profile
")?id="
+ e.event.ProfileId;
},
views: [
{ type:
"month"
, selected:
true
},
{ type:
"day"
},
],
resources: [{
dataSource: {
transport: {
read: {
url:
"@Url.Action("
ListAll
", "
Lab
")"
}
},
schema: {
model: {
id:
"Id"
,
fields: {
Id: {
"type"
:
"number"
},
ProfileId: {
"type"
:
"number"
},
Name: {
"type"
:
"string"
},
DisplayColor: {
"type"
:
"string"
}
}
}
}
},
title:
"Lab"
,
field:
"LabId"
,
dataTextField:
"Name"
,
dataValueField:
"Id"
,
dataColorField:
"DisplayColor"
}],
dataSource: {
transport: {
read: {
url:
"@Url.Action("
List
", "
Calendar
")"
,
dataType:
"json"
,
contentType:
"application/json; charset=utf-8"
,
type:
"POST"
},
parameterMap:
function
(options, operation) {
if
(operation ===
"read"
) {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
var
result = {
start: scheduler.view().startDate(),
end: scheduler.view().endDate()
}
return
kendo.stringify(result);
}
return
kendo.stringify(options);
}
},
serverFiltering:
true
,
schema: {
model: {
id:
"taskID"
,
fields: {
taskID: { from:
"TaskID"
, type:
"number"
},
title: { from:
"Title"
, defaultValue:
"No title"
, validation: { required:
true
} },
start: { type:
"date"
, from:
"Start"
},
end: { type:
"date"
, from:
"End"
},
startTimezone: { from:
"StartTimezone"
},
endTimezone: { from:
"EndTimezone"
},
description: { from:
"Description"
},
recurrenceId: { from:
"RecurrenceID"
},
recurrenceRule: { from:
"RecurrenceRule"
},
recurrenceException: { from:
"RecurrenceException"
},
ownerId: { from:
"OwnerID"
, defaultValue: 1 },
isAllDay: { type:
"boolean"
, from:
"IsAllDay"
},
LabId: { from:
"LabId"
, type:
"number"
},
ProfileId: { from:
"ProfileId"
, type:
"number"
}
}
}
}
}
});
});
</script>
The field I want to sort by is LabId, which is a long.
Additionally, if there was a way to do this in MVC instead, greatly appreciated. With the inclusions of resources, I had trouble doing it in MVC.
Hi, I've been trying to figure out a way to make the markers on my scatter chart solid. It'd be nice if there was a prop for this.
I am able to set the color with a function, but that only sets the stroke color. I can set the background in the marker props, but that doesn't take a function so some of my points don't have a matching background to stroke.
Hi All,
I have a js variable JSON_DATA that contains the return result from a .py api. It has a schema 'xyz' and 5 columns (a,b,c,d,e). I've tried to setup the the schema and datasource several different ways and I can't seem to get it to bind the data. Can someone shed some light on this for me? See below:
This is where I'm at now, I removed schema to see if I could get something back but I'm stuck:
\$(document).ready(function() {
\$("#grid").kendoGrid({
dataSource: {
data: $JSON_DATA },
height: 550,
scrollable: true,
sortable: true,
filterable: true,
pageable: {
input: true,
numeric: false
},
columns: [
{ field: 'productType', title: 'CSS-WX Product Type', width: '230px'},
{ field: 'serviceType', title: 'Web Service Type', width: '100px'},
{ field: 'average', title: 'Average', width: '130px' },
{ field: 'target', title: 'Target', width: '130px' },
{ field: 'iterations', title: 'Iterations', width: '130px' }
]
});
});
I have a TreeView implementation that often contains hierarchies that have large numbers of nodes in very flat structures. While I have drag and drop working, the usability just isn't very good. So, I'm implementing a cut/paste mechanism where the cut simply remembers the unique id of the source node and on paste of the target node, I get the source node using its id and attempt to .append(sourceNode, targetNode).
However, this doesn't seem to work.
Is this the best way to approach this or is there a different way I should approach this?
$("#mnuHierarchyRightClick").kendoContextMenu({
target: "#tvHierarchy",
filter: ".k-in",
select: function (e)
{
switch (e.item.id)
{
case "mnuHierarchyRightClickCut":
var tv = $("#tvHierarchy").data("kendoTreeView");
var dataItem = tv.dataItem(e.target);
self.setClipBoard(dataItem.ID,'Clipboard: ' + dataItem.Text);
break;
case "mnuHierarchyRightClickPaste":
self.paste(e.target);
break;
default:
break;
};
}
});
// called from click on context menu of the TreeView
MyController.prototype.paste = function (targetNode)
{
var self = this;
try
{
var tv = $("#tvHierarchy").data("kendoTreeView");
if (targetNode == null) { return false; }
var targetDataItem = tv.dataItem(targetNode);
var pastedDataItem = tv.dataSource.get(self.ClipBoardPrimaryKeyID);
self.setClipBoard(0,'');
var pastedNode = tv.findByUid(pastedDataItem.uid);
pastedDataItem.set('parentID', targetDataItem.id);
tv.append(pastedNode,targetNode);
}
catch(e)
{
alert(e);
}
}
We just upgraded from Kendo 2016.2 to 2017.2.621 and it's seems like we can't use the setStatusClass from the drag event anymore. The documentation says that the naming convention has changed starting with version 2016.3.914 but I've tried every pattern possible involving the k and the i without success. None of the provided value used enabled the k-denied icon. Also, calling setStatusClass with k-denied use todo the same job as calling a e.setValid(false); on the drop event... this ain't working anymore.
Here's a snippet that reproduce the problem.
Hi. I need your help about formatting my KendoUI chart.I use KendoUI chart with my Delphi + Unigui code
My doubts are in the
figure attached. The main doubt is how to format the horizontal axis to
show the desired number of decimals. I want to change from
one decimal ( one number after the comma like 2200,0 ) to two decimals (like 2200,00 ). This
line of code did not work TNumericField(FieldByName('distM')).DisplayFormat
:= '#,0.00';
Code to try to fix the decimals
ChartSeries.Values['Fmod'] := 'serFmod';
ChartProperties.Values['valueAxis'] :=
'{labels: {format: "#,0.0"}}';
// vertical axis one decimal
ChartProperties.Values['tooltip'] :=
'{visible: true, format: "#,0.000"}';
// points 3 decimals
ChartSeriesDefaults := 'labels: {visible:
true, position: "insideEnd", format: "#,0.00"}';
If needed I can send a test case using Delphi + Unigui.
Hello,
I am using this code to filter a Date Column in Kendo Ui Grid
field: 'myDatetimeColumn', title: 'Date', width: "12%"
, filterable: {
ui: function (element) {
element.kendoDateTimePicker({
format: "dd-MMM-yyyy HH:mm",
timeFormat: "HH:mm"
});
}
}
But it is not filtering correctly .
Please find attached screen shots for more information.
Also https://dojo.telerik.com/eWAKAmoW/2 you can reproduce the issue there.
Regards,
Amr Saafan
https://www.nilebits.com/
I understand dataSource.view() returns only data from the current page and dataSource.data() is supposed to return everything. In our case, it does not for some reason.
Here's the DataSource setup from the server
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetRevenueData", "RevenueBudgetTool").Data("GetRevenueDataParams"))
.Model(mod => mod.Id(m => m.ClientId))
.PageSize(12)
)
And here's how we tried to get all the data in Javascript
$("#RevenueBudgetToolGrid").data("kendoGrid").dataSource.data();
The above line returns only 12 rows of data instead of 21 (total)
Hello there,
i attached Photos so that you can see my problem ..
First i had the selection tag attached to my scheduler ..
So i had to click on the day and then click on the (...) Button to navigate to the correct day ..
if i click on a day and then click the (...) Button from another day .. it will navigate to the day i clicked on before clicking on the (...) Button ..
So i removed the selction tag (for now) ..
now i can't select .. so i go directly and click on the Button .. and as you can see on the Pics .. it's not going the right direction !!
PS : IT'S NAVIGATING TO THE ANOTHER DAY AT THE SAME MONTH !!!!!!