Telerik Forums
Kendo UI for jQuery Forum
1 answer
81 views

HI, I'm beginner for Telerik Platform with hybrid app. Sorry for this dummy question. I'm trying to load a scheduler with a web service which returns the following:

 

{"JSONDataResult":[{"Description":"Full Name","End":"\/Date(1458450000000-0500)\/","EndTimezone":null,"IsAllDay":true,"OwnerID":"1","RecurrenceException":null,"RecurrenceID":null,"RecurrenceRule":null,"Start":"\/Date(1458450000000-0500)\/","StartTimezone":null,"TaskID":"1","Title":"Full Name"},{"Description":"Full Name","End":"\/Date(1458450000000-0500)\/","EndTimezone":null,"IsAllDay":true,"OwnerID":"2","RecurrenceException":null,"RecurrenceID":null,"RecurrenceRule":null,"Start":"\/Date(1458450000000-0500)\/","StartTimezone":null,"TaskID":"2","Title":"Full Name"}]}

 

View model is the following, but it no works. What's wrong?.  Thanks so much for your help.

 

var viewModel = kendo.observable({
        isVisible: true,
        tasks: new kendo.data.SchedulerDataSource({
            batch: true,
            transport: {
                read: {
                    url: "http://xxx/RestServiceImpl.svc/json",
                    dataType: "json"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                }
            },          
            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" },
                        isAllDay: { type: "boolean", from: "IsAllDay" }
                    }
                }
            }
        })
    });

 
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Sorry for my writing . I'm trying to load a scheduler with a web service which returns the following:
Vladimir Iliev
Telerik team
 answered on 31 Mar 2016
6 answers
149 views

The legend colors are not matching the colors I have set for the individual series in my bar chart. I have read through several different forum topics that were supposed to have a  solution, but none of them seem to work. I am using hexadecimal web colors and assigning them to Series.Color as specified in "http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-series.color".   How can I CUSTOMIZE or SET the legend colors as well?  I have read the following forum topics, but neither solve the problem. 

 

http://www.telerik.com/forums/legend-color-change#Feo0EzBZ6E6jA3Ns-3WOjQ

http://www.telerik.com/forums/stack-bar-chart#HvKBqPuqP023kBLIQHAnrA

Daniel
Telerik team
 answered on 31 Mar 2016
13 answers
2.6K+ views
I'm using the 2014.2.909 nightly build and Angular-Kendo 1.03.  When I create a grid that has filtering, grouping, or column ordering, I get this when navigating away from the view:

TypeError: Cannot read property 'destroy' of undefined
at N.ui.DataBoundWidget.extend.destroy (http://localhost:1391/Scripts/kendo/2014.2.909/kendo.all.min.js:22:31285)
at http://localhost:1391/Scripts/angular-kendo.js:214:28
at Scope.$broadcast (http://localhost:1391/Scripts/angular.js:12887:28)
at Scope.$destroy (http://localhost:1391/Scripts/angular.js:12545:14)
at Scope.$delegate.__proto__.$destroy (<anonymous>:812:29)
at cleanupLastView (http://localhost:1391/Scripts/AngularUI/ui-router.js:2243:26)
at updateView (http://localhost:1391/Scripts/AngularUI/ui-router.js:2269:11)
at eventHook (http://localhost:1391/Scripts/AngularUI/ui-router.js:2224:17)
at Scope.$broadcast (http://localhost:1391/Scripts/angular.js:12887:28)
at $state.transition.resolved.then.$state.transition (http://localhost:1391/Scripts/AngularUI/ui-router.js:1822:22)
Detected Kendo UI version: "2014.2.909" 

I am not explicitly calling destroy, it is being handled by Angular or jQuery (I suspect the former since the grid is created via a Angular-Kendo directive).  I have a page with many grids like this in various tabs and when leaving the page, I end up flooding my error logging with this same error for each behavior on each grid that causes it.  I had suspected it was an issue with Angular-Kendo but the issue in that repo has been closed for a long time.  I read in this thread what seemed like a similar problem since all of the widgets decend from the same base but switching to the nightly build didn't change anything.  It does look like the widget is being destroyed by something, how do I get Kendo to stop trying to do it again?
Nikolay Rusev
Telerik team
 answered on 31 Mar 2016
7 answers
1.6K+ views

I am using Kendo UI Grid with AngularJS. Some of my columns are narrow and the column headers don't display fully (they end in ... next to the filter icon). I want to display tooltip when I hover over them. I also want to display tooltip for every cell in the grid when I hover over them. I looked at some examples from this forum but they were showing tooltip only for a specific column. How can I display tooltips for all headers and cells?

 

Development details:

Kendo UI version: 2016.1.226

OS: Windows 8.1

Browser: Chrome 49, Firefox 45, IE 11

 

Editing the standard AngularJS grid sample will be helpful to us. If this has already been answered, kindly redirect me to the answers.

Thank you for your time.

Rahul
Top achievements
Rank 1
 answered on 30 Mar 2016
1 answer
131 views

I trying to map a simple JSON data from the web service to the Kendo UI AutoComplete, but I keep on getting Unexpected token : error. Below is the data set from the service, and the Kendo UI piece.

{
"d": [{
"__type": "Subscriber:#Entities",
"ContactEmail": null,
"ContactName": null,
"ContactPhone": null,
"FolderPath": null,
"Notes": null,
"OrganizationName": "Sample Holdings PLC",
"ProvisionAckReceived": "\/Date(-62135571600000-0700)\/",
"ProvisionFileSent": "\/Date(-62135571600000-0700)\/",
"Status": null,
"SubscriberUpdated": "\/Date(-62135571600000-0700)\/"
}, {
"__type": "Subscriber:#Entities",
"ContactEmail": null,
"ContactName": null,
"ContactPhone": null,
"FolderPath": null,
"Notes": null,
"OrganizationName": "Sample LLC",
"ProvisionAckReceived": "\/Date(-62135571600000-0700)\/",
"ProvisionFileSent": "\/Date(-62135571600000-0700)\/",
"Status": null,
"SubscriberUpdated": "\/Date(-62135571600000-0700)\/"
}, {
"__type": "Subscriber:#Entities",
"ContactEmail": null,
"ContactName": null,
"ContactPhone": null,
"FolderPath": null,
"Notes": null,
"OrganizationName": "Test LLC",
"ProvisionAckReceived": "\/Date(-62135571600000-0700)\/",
"ProvisionFileSent": "\/Date(-62135571600000-0700)\/",
"Status": null,
"SubscriberUpdated": "\/Date(-62135571600000-0700)\/"
}]
}

<script>

$("#search").kendoAutoComplete({            
dataTextField: "OrganizationName",            
minLength: 3,
dataSource: {
type: "odata",
transport: {
read: GetServiceUrl('SubscriberSubscriptionSearch'),
parameterMap: function () {
return { searchText: $("#search").data("kendoAutoComplete").value() };
}
},
schema: {                    
data: "d",
model: {
fields: {
OrganizationName: { type: "string" }
}
}
}
},           
placeholder: " Search existing Subscribers/Subscriptions",
close: onClose
});

</script>

 

 

Nirav
Top achievements
Rank 1
 answered on 30 Mar 2016
3 answers
355 views

We are using the example chart at the moment trying to resize the donut,  The doc say use seriesdefault.holeSize  holeSize does not exists

The difference between the example code and others is

 

Example code

.SeriesDefaults(series => series.Donut()
.StartAngle(150)

 

Telerik Support code

seriesDefaults: {
     holeSize: 20,

 

so using the example code below what's the way to resize the chart,  also, Id like to know how to add values to the donut to show what value the % come from.

 

Thanks in advance

Example code used

<div class="demo-section k-content wide">
@(Html.Kendo().Chart()
.Name("EventPriorityGraph")
.ChartArea(chartArea => chartArea
.Background("transparent")
// .Width(200)
// .Height(200)
)
.Title(title => title
.Text("Events by priority")
.Position(ChartTitlePosition.Bottom)
)
.Legend(legend => legend
.Visible(false)
)
.SeriesDefaults(series => series.Donut()
.StartAngle(150)

)
.Series(series =>
{
series.Donut(new dynamic[] {
new {category = "P1",value = 0,color = "#ADC9D5"},
new {category = "P2",value = 0,color = "#5FCBFF"},
new {category = "P3",value = 0,color = "#49B4E7"},
new {category = "P4",value = 0,color = "#00689B"},
new {category = "Unknown",value = 100,color = "#002D42"},
})
.Name("2014");

series.Donut(new dynamic[] {
new {category = "P1",value = 1.72,color = "#ADC9D5"},
new {category = "P2",value = 3.41,color = "#5FCBFF"},
new {category = "P3",value = 17.45,color = "#49B4E7"},
new {category = "P4",value = 73.56,color = "#00689B"},
new {category = "Unknown",value = 3.83,color = "#002D42"},
})
.Name("2015");
series.Donut(new dynamic[] {
new {category = "P1",value = 1.61,color = "#ADC9D5"},
new {category = "P2",value = 2.51,color = "#5FCBFF"},
new {category = "P3",value = 16.247,color = "#49B4E7"},
new {category = "P4",value = 75.35,color = "#00689B"},
new {category = "Unknown",value = 4.26,color = "#002D42"},
})
.Name("2016")
.Labels(labels => labels
.Visible(true)
.Position(ChartPieLabelsPosition.OutsideEnd)
.Template("#= category #: \n #= value#%")
.Background("transparent")
);
})
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= category # (#= series.name #): #= value #%")
)
)
</div>

Iliana Dyankova
Telerik team
 answered on 30 Mar 2016
1 answer
223 views

How can I convert the following MVC scheduler's code to kendo syntax? I am converting Telerik MVC scheduler to kendo scheduler.

 

.Group(group => group.Resources("Techs").Orientation(SchedulerGroupOrientation.Vertical))                                    .Resources(resource =>
{
   resource.Add(m => m.TechName)
   .Title("Techs")
   .Name("Techs")
   .DataTextField("TechName")
   .DataValueField("emm_code")
   .DataColorField("Color")
   .DataSource(d => d.Read("Techs", "JOBS"));
})

 

Thanks.

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 30 Mar 2016
1 answer
258 views

How I can cause the second combo box of cascading group of a combo boxes to automatically select the only item found after a user selects an item from the first combo box. While it may seem simply straight forward, it has proven quite difficult. JavaScript tricks such as select(0) or value(0) have not worked.

 

Thank you for your help,

Adam

Dimiter Topalov
Telerik team
 answered on 30 Mar 2016
1 answer
269 views
Is it possible to dynamically move a grid column from one position to another, and does doing so impact the underlying array sequence of dataItems? I need to basically swap the positon of two columns depending on user selection of options elsewhere on the form. OR as an alternative clear the columns and recreate them in the desired sequence. This only needs to be done once per page load.
Konstantin Dikov
Telerik team
 answered on 30 Mar 2016
5 answers
1.9K+ views

I am using the setOptions method of the Kendo UI Grid to persist user options for columns, sorting, etc.  I am storing the options in local storage of the browser. 

I need to call setOptions when the view is displayed and the Grid has been created.  It's a bit inconsistent, as sometimes when the grid.setOptions() is called, the grid object is undefined.  How can I make sure that I don't call grid.setOptions until the grid is ready to use?  Code snippet shown below.

$("#grid").kendoGrid({

});

var grid = $(_gridId).data("kendoGrid");
var options = localStorage['xxxx'];
if (options) {
grid.setOptions(JSON.parse(options));
}

Viktor Tachev
Telerik team
 answered on 30 Mar 2016
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?