Telerik Forums
Kendo UI for jQuery Forum
1 answer
393 views

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

 

Ivan Danchev
Telerik team
 answered on 07 Nov 2017
1 answer
405 views

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 

 

Dimitar
Telerik team
 answered on 07 Nov 2017
4 answers
227 views

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:

  1. Using a HierarchicalDataSource means that even if all the data is loaded at once, the tree doesn't fully populate.
  2. Declaring custom fields for child nodes doesn't auto-populate populated child nodes 
  3. In the static `data: [...]` version, it is possible to load child collections by calling `datasource.data().at(i).load()`, but it must be called twice to display the template for the children 
  4. In the remote-datasource version, load() doesn't load the data in the custom child collection ("locations"), though it does populate the dataitem.children collection. 
  5. Binding the template to `data-bind="source: children"` results in an Invalid Template error in the static version
  6. Binding the same template from #5 to `data-bind="source: locations"` works, but error #3 occurs, and load() doesn't work when first called. 
In short: given a heterogenous hierarchical dataset, how do I display nested editors for each node and its (different to itself) children?
Plamen
Telerik team
 answered on 07 Nov 2017
8 answers
343 views

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.

 

 

 

Neli
Telerik team
 answered on 07 Nov 2017
1 answer
894 views

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.

 

Veselin Tsvetanov
Telerik team
 answered on 07 Nov 2017
1 answer
181 views

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

 

Stefan
Telerik team
 answered on 07 Nov 2017
1 answer
519 views

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

Stefan
Telerik team
 answered on 07 Nov 2017
2 answers
211 views

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

 

 

 

 

Jayaram Krishnan
Top achievements
Rank 1
 answered on 07 Nov 2017
5 answers
785 views

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) {
                    }
                });

Dimitar
Telerik team
 answered on 07 Nov 2017
4 answers
379 views
Hi Guys,

I have encountered a problem under Edge whereby the grid header and data columns become misaligned after double-clicking a resize handle and then moving the mouse over the headers.

See the attached zip file which contains a mp4 video that demonstration the problem.

Unfortunately I haven't be able to replicate the issue within a dojo example but my investigations so far have revealed

- Problem only occurs under Edge ... Chrome and Firefox work fine
- The number/type of columns does not seem to be a factor as long as the total column width exceeds the grid width causing a horizontal scrollbar to be shown
- Problem occurs with or without frozen columns
- Initial column size is not a factor
- Field data is not a factor as a zero record grid also shows the same problem

Therefore I was wondering

a) Has this type of problem been encountered before and if so was there a solution
b) If you had any thoughts on what might be causing the problem
c) Any other suggestions or areas for further investigation

Regards
Alan
AGB
Top achievements
Rank 1
Iron
 answered on 06 Nov 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?