In a Kendo spreadsheet I can manually set which borders a cell should have, and the color using the Borders tool palette. Suppose I change my mind and want to remove borders. The palette does not appear to have a 'remove all borders' item.
Q: Is it possible to remove borders once added ?
Suggestion: A great addition to the Borders palette would be to add edge style (dotted, dashed, solid, etc) and thickness. Additionally, if you could palettize (and add to API) all beloved CSS bordering features that would be even better.
Regards,
Richard
HI,
That was weird,
I am using VS 2015 to publish a web project to local drive.
Everything was good except kendo fonts were not included in the destination folders.
I am talking about:
Styles\images\kendoui.ttf
Styles\images\kendoui.woff
Styles\fonts\glyphs\KendoUIGlyphs.eot
Styles\fonts\glyphs\KendoUIGlyphs.ttf
Styles\fonts\glyphs\KendoUIGlyphs.woff
Styles\fonts\glyphs\WebComponentsIcons.eot
Styles\fonts\glyphs\WebComponentsIcons.ttf
Styles\fonts\glyphs\WebComponentsIcons.woff
I manually copied them to website destination folders and then they appeared on the page
Any thoughts?
Thank you
I'm trying to create an editor for a HierarchicalDataSource (remotely loaded as JSON).
I'm using `kendo.bind($('#target'),kendo.observable({data: new kendo.data.HierarchicalDataSource(<..config...>)});` to bind a hierarchical datasource with 3 levels of depth (customer -> location -> stores) [as an example]. For each level, I have a separate template for each type of child. I have a dojo demonstrating a static version.
I have several issues:
I'm using a kendoTooltip on a Listview with a custom content function set up like this:
return acontrol.kendoTooltip({
width: 220,
height: 280,
position: "right",
show: function(e) {},
autoHide: false,
showAfter: 1000,
content: function(e) {},
hide: function(e) {}
}).data("kendoTooltip");
I have the autoHide set to false in the tooltip and am setting timeouts on the show function, mouseout, and mousenter of the tooltip itself in order to hide the tooltip after x amount of time, but when I move to the following element, it hides the tooltip anyway. Putting e.preventDefault()) in the hide function prevents the timeout from hiding the tooltip, but it doesn't stop the tooltip from being hidden on moving to a different item in the listview, even though I see that the content function fires for the new listview item (the show function never does). I need the autoHide set to false as actually trying to work with any of the information within the tooltip is difficult without quickly moving the mouse into the tooltip. How can I work around this? My solution works fine if the tooltip has timed out when moving to the next item, but if the timeout has not expired, it hides it and doesn't display the new data retrieved.
I want to use range to set a cells value to a date.
What is the date literal expression that can be used in range.value() ?
For example:
var
book = $(
"#book"
).kendoSpreadSheet({}).data(
"kendoSpreadsheet"
);
var
sheet = book.activeSheet();
sheet.Range(
"A1"
)
.value( ... what spreadsheet date literal goes here ...)
.format(kendo.spreadsheet.formats.date)
;
I have been able to use a formula to put a date value in the cell
var
book = $(
"#book"
).kendoSpreadSheet({}).data(
"kendoSpreadsheet"
);
var
sheet = book.activeSheet();
var
dateTime =
new
Date (
"10/31/2017 12:00:00 AM"
);
var
dateMeth =
"=DATE("
+ dateTime.getFullYear() +
","
+ dateTime.getMonth() +
","
+ dateTime.getDay() +
")"
;
sheet.Range(
"A1"
)
.formula(dateMeth)
.format(kendo.spreadsheet.formats.date)
;
It works, but is ugly !
My actual problem is a little more complicated because I am doing this in a Razor based MVC view that has get the value from a DateTime field in the view model. The spreadsheet 'construction' is too complicated for using MVC HtmlHelpers.
I have a large grid with selectable rows that is polled to refresh data - I am noticing that the grid after selecting rows when the refresh occurs the grid has detached Dom Tree - I think this is due to the select() keeping the last selected target in javascript
I have created a dojo and attached a screen grab
from the screen grab you can see this detached dom tree has a retained size
How do I clear the retained Dom Tree?
https://dojo.telerik.com/elITE
Hi,
Id like to "query" the data of a dataSource that is attached to a Grid, without actually applying the results.
Maybe its better to say, I want to execute a filter() to determine how many results match my search criteria without applying the filter results to the grid.
Im sure I could execute a filter, read the data from the view, then clear the filter, but that method just seems wrong.
Is such a thing possible?
Thanks,
Grant
Hi,
My scheduler is working until the moment i add resource grouping, it will throw this error:
kendo.all.js:5317 Uncaught TypeError: Cannot read property
'length'
of undefined
at r.sort (kendo.all.js:5317)
at r._sortForGrouping (kendo.all.js:5403)
at r.groupBy (kendo.all.js:5376)
at r.group (kendo.all.js:5354)
at Function.r.process (kendo.all.js:5525)
at init._queryProcess (kendo.all.js:6941)
at init._process (kendo.all.js:6931)
at init.success (kendo.all.js:6683)
at success (kendo.all.js:6610)
at Object.ye.extend.read.n.success (kendo.all.js:5599)
The line that causes the error is:
group: { resources: [
"Colleges"
]},
My code and a sample of the datasource json response are below:
var
tz =
"Asia/Dubai"
;
$(document).ready(
function
() {
$(
"#scheduler"
).kendoScheduler({
date:
new
Date(),
selectable:
true
,
editable: {
template: $(
"#editor"
).html(),
editRecurringMode:
"dialog"
},
edit:
function
(e) {
console.log(e.event);
e.preventDefault();
if
(e.event.id!=0)
{
url =
'@Url.Action("Details", new { id = "id" })'
;
url = url.replace(
'id'
, e.event.id);
}
else
{
var
selectedStartDate = (
"0"
+(e.event.start.getDate())).slice(-2) +
"-"
+ (
"0"
+(e.event.start.getMonth()+1)).slice(-2) +
"-"
+ e.event.start.getFullYear() +
" "
+ (
"0"
+ e.event.start.getHours()).slice(-2) +
":"
+ (
"0"
+ e.event.start.getMinutes()).slice(-2);
var
selectedEndDate = (
"0"
+(e.event.end.getDate())).slice(-2) +
"-"
+ (
"0"
+(e.event.end.getMonth()+1)).slice(-2) +
"-"
+ e.event.end.getFullYear() +
" "
+ (
"0"
+ e.event.end.getHours()).slice(-2) +
":"
+ (
"0"
+ e.event.end.getMinutes()).slice(-2);
url=
'@Url.Action("Create")?startDate='
+ selectedStartDate+
'&endDate='
+ selectedEndDate;
}
window.location = url;
},
change:
function
(e) {
$(
"#viewBTN"
).prop(
'disabled'
, (e.events==
null
|| e.events.length!=1));
canCancel = (e.events!=
null
&& e.events.length==1);
if
(canCancel ==
true
)
canCancel = canCancel && e.events[0].StatusID == @CarBookingStatusTypes.Approved.ToInt();
if
(canCancel ==
true
)
canCancel = canCancel && e.events[0].FromDate >
new
Date();
$(
"#deleteBTN"
).prop(
'disabled'
, !canCancel);
$(
"#editBTN"
).prop(
'disabled'
, (e.events==
null
|| e.events.length!=1));
var
canAttendTo = (e.events!=
null
&& e.events.length==1);
if
(canAttendTo ==
true
)
canAttendTo = canAttendTo && e.events[0].StatusID == @CarBookingStatusTypes.Pending.ToInt();
$(
"#attendToBTN"
).prop(
'disabled'
, !canAttendTo);
}
, views: [
{
type:
"day"
, showWorkHours:
true
, showWorkHours:
true
, workWeekStart: 7,
workWeekEnd: 4
},
{
type:
"week"
, selected:
true
, showWorkHours:
true
, workWeekStart: 7,
workWeekEnd: 4
},
"month"
],
timezone: tz, dataSource:{
batch:
false
,
serverFiltering:
true
,
"type"
:
"aspnetmvc-ajax"
,
transport: {
read: {
url:
"/CarBookings/GetAllBookings"
, dataType:
"json"
, data:
function
(e) {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
var
result = {
FromDate: scheduler.view().startDate().toISOString(),
ToDate:
new
Date(scheduler.view().endDate().getTime() + ((23 * 60 * 60 * 1000) + (59 * 60 * 1000) + (59 * 1000)+ 999)).toISOString()
,skip: scheduler.dataSource.skip(),
take: scheduler.dataSource.take(),
sort:scheduler.dataSource.sort(),
page:scheduler.dataSource.page()
}
return
result;
}
},
destroy: {
url:
"/OffenderSchedules/Delete"
,
dataType:
"json"
}
, parameterMap:
function
(data, operation) {
console.log(
"operation:"
+ operation);
if
(operation ===
"update"
|| operation ===
"create"
) {
data.Start = kendo.toString(kendo.parseDate(data.Start),
"G"
);
data.End = data.Start;
return
JSON.stringify({ postedItem: data });
}
else
if
(operation ===
"read"
) {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
var
endDate =
new
Date(scheduler.view().endDate().getTime() + ((23 * 60 * 60 * 1000) + (59 * 60 * 1000) + (59 * 1000)));
if
(data.filter === undefined) {
data = $.extend({
filter: {
logic:
"and"
,
filters: [
{ operator:
"gte"
, field:
"FromDate"
, value: kendo.toString(kendo.parseDate(scheduler.view().startDate()),
"G"
) },
{ operator:
"lte"
, field:
"ToDate"
, value: kendo.toString(kendo.parseDate(endDate),
"G"
) }
]
}
}, data);
}
else
if
(data.filter.filters === undefined) {
data = $.extend({
filters: [
{ operator:
"gte"
, field:
"FromDate"
, value: kendo.toString(kendo.parseDate(scheduler.view().startDate()),
"G"
) },
{ operator:
"lte"
, field:
"ToDate"
, value: kendo.toString(kendo.parseDate(endDate),
"G"
) }
]
}
, data.filter);
}
else
{
data.filter.filters.push({
logic:
"and"
, filters: [
{ operator:
"gte"
, field:
"FromDate"
, value: kendo.toString(kendo.parseDate(scheduler.view().startDate()),
"G"
) },
{ operator:
"lte"
, field:
"ToDate"
, value: kendo.toString(kendo.parseDate(endDate),
"G"
) }
]
});
}
}
return
data;
}
}
,
group: { resources: [
"Colleges"
]},
resources: [
{
field:
"collegeID"
,
name:
"Colleges"
,
dataSource:[
{ text:
"Central Services"
, value: 5, color:
"#6eb3fa"
}
, { text:
"College 2"
, value: 4, color:
"#f58a8a"
}
],
title:
"College"
}
],
schema: {
parse:
function
(response) {
for
(
var
i = 0; i < response.Data.length; i++) {
if
(response.Data[i].VehicleDisplayName ==
null
)
response.Data[i][
'Title'
] =
"To:"
+ response.Data[i].ToLocationText +
', Passengers:'
+
response.Data[i].CarBookingPassengersList;
else
response.Data[i][
'Title'
] =
"#:"
+ response.Data[i].VehicleNumber +
","
+ response.Data[i].VehicleDisplayName +
",To:"
+ response.Data[i].ToLocationText +
',Passengers:'
+
response.Data[i].CarBookingPassengersList;
}
return
response;
},
data:
"Data"
,
model: {
id:
"ID"
,
fields: {
ID: {
from:
"ID"
,
type:
"number"
},
collegeID: { from:
"CollegeID"
,type:
"number"
, nullable:
true
},
title: { from:
"Title"
, validation: { required:
true
} },
start: { type:
"date"
, from:
"FromDate"
},
end: { type:
"date"
, from:
"ToDate"
},
description: { from:
"VehicleDisplayName"
},
recurrenceId: { from:
"RecurrenceID"
},
recurrenceRule: { from:
"RecurrenceRule"
},
recurrenceException: { from:
"RecurrenceException"
},
isAllDay: { from:
"IsAllDay"
},
startTimezone: { type:
"string"
, defaultValue: tz },
endTimezone: { type:
"string"
, defaultValue: tz }
}
}
},
sort:{ field:
"FromDate"
,dir:
"asc"
}
,change:
function
(e)
{
}
}
});
});
datasource response sample:
{
"Data"
:[{
"CreatedByDriver"
:
null
,
"ID"
:11,
"ApprovalStatusID"
:
null
,
"StatusID"
:526,
"VehicleID"
:
null
,
"VehicleNumber"
:
null
,
"FromDate"
:
"\/Date(1509393600000)\/"
,
"ToDate"
:
"\/Date(1509485400000)\/"
,
"CreatedByID"
:
"a5cc4472-055a-41f1-96ac-ae024f20869f"
,
"DateCreated"
:
"\/Date(1509432711343)\/"
,
"LastUpdatedByID"
:
null
,
"DateLastUpdated"
:
null
,
"CreatedByName"
:
"User1 "
,
"LastUpdatedByName"
:
null
,
"StatusName"
:
"Pending"
,
"CollegeID"
:5,
"CollegeName"
:
"College 1"
,
"FromLocationID"
:5,
"ToLocationID"
:4,
"FromLocationName"
:
"Central Services"
,
"FromLocationText"
:
"Central Services"
,
"ToLocationName"
:
"College 2"
,
"ToLocationText"
:
"College 1"
,
"RecurrenceID"
:
null
,
"RecurrenceRule"
:
null
,
"RecurrenceException"
:
null
,
"IsAllDay"
:
false
,
"CarBookingComments"
:
"I would need to book a car "
,
"ApprovalComments"
:
null
,
"Vehicle"
:
null
,
"VehicleDisplayName"
:
"
,
"CarBookingPassengersList"
:
""
,
"DriverID"
:
null
,
"DriverName"
:
null
,
"DriverAspNetUserName"
:
null
,
"IsEmergency"
:
true
,
"PassengerIDs"
:
null
,
"CarBookingPassengerNames"
:[],
"CreatedByCollegeName"
:
null
}]
Thanks
Madani
I have a requirement to create an hierarichal treeview on my page. which has around 1600 parent nodes and each parent nodes may have child node ranging from 2 to 20. So i am dealing with large amount of data. i am able to create a Hierarchical datasource and then binding datasource to treeview taking almost 5 minutes and its slowing down the whole page. Following is the configuration i am using for treeview.
i checked that i can't do paging in treeview. also i have loadonDemand set to true. is treeview able to handle such large chunk of data , if not what other tool i can use to display data in parent-child order? Please let me know
$("#tvLosDiag").kendoTreeView(
{
loadOnDemand: true,
dragAndDrop: false,
dataTextField: ["CategoryDescription", "DescriptionWithCode"],
checkboxes: {
template: "<input type='checkbox' name='checkedNode' #=(item.Checked) # />",
checkChildren: true
},
check: function (e) {
}
});