Telerik Forums
Kendo UI for jQuery Forum
1 answer
850 views
Hi All,
I'm starting to use Kendo's Chart functions for the first time. Using Local Data I can get a chart working fine (http://dojo.telerik.com/eYIrO). When I uncomment out the "transport" section of that Dojo to use Remote Data I get an error in Line 11 of kendo.all.min.js: Uncaught TypeError: e.slice is not a function

The data received by the URL is the exact same as the varDataSource variable (I use PHP json_encode array which I use with Google Charts):
{"data":[{"varRTT":"12","varIPAddress":"10.6.120.240","varPingDate":"1"},{"varRTT":"13","varIPAddress":"10.6.120.240","varPingDate":"2"},{"varRTT":"19","varIPAddress":"10.6.120.240","varPingDate":"3"},{"varRTT":"2","varIPAddress":"10.10.115.252","varPingDate":"4"},{"varRTT":"2","varIPAddress":"10.10.115.252","varPingDate":"5"}]}

I've seen some issues in the forums with remote data and serverGrouping so I disabled that. I also tried to use Schema.Model and define my fields but it didn't work or I didn't do it correctly.

Any help would be appreciated.
Thanks!
Andy
Andy
Top achievements
Rank 1
 answered on 26 Oct 2015
1 answer
315 views

Hello all, 

 

I am dynamically binding a bar chart and I thought the chart area would dynamically change based on the data for the chart, but that is not the case. Instead the height stays fixed and the data becomes squished so you can't see it (see attached image). I know I can dynamically change the chartarea value by setting a value, but the number of bars is ever changing. What can be done to fix this?

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 26 Oct 2015
2 answers
148 views

Hello there

I'm working with 2 DropDownLists, parent and child. It works fine so far with cascading . Then I realized the relation from parent to child is always 1:n. Is there a (easy) way to make it n:n? An example based on data source:

Parent:

      dataSource: [
        { actionText: "​​Drive", actionId: 1 },
        { actionText: "​Open", actionId: 2 }
      ] 

 Child: 

      dataSource: [
        { objectText: "Car", objectId: 1, actionId: 1 },
        { objectText: "Window", objectId: 2, actionId: 2 }
 ]

This gives the following (cascading) relations: 

Drive   -> Car
Open   -> Window

But a car can be opened (its doors)  as well, so the following cascading relations are wanted:
Drive -> Car
Open -> Car
           -> Window

That means I need to define two relations from child "Car" to parent (to "Drive" AND "Open"). So when "Open" is chosen from parent DropdownList the child DropdownList should have listed "Window" AND "Car" do be chosen. 

Is there a (easy) way to define this? As a workaround I see a reconfiguration of the child dataSource after selecting an item from the parent DropdownList.

Regards

    

 

Tayger
Top achievements
Rank 1
Iron
Iron
 answered on 26 Oct 2015
1 answer
168 views

Hi,

I'm setting up an inline editor as follow, but I'm having challenges setting its default value.

I'm receiving an HTML value and it should be displayed formatted in the editor, please address me what I'm doing wrong:

 

01.var message = '<p>123</p><p>1<strong>2</strong>3</p>';
02.<div id="editor"></div>
03.$("#editor").kendoEditor({
04.       tools: [
05.            "bold",
06.            "italic",
07.            "insertUnorderedList",
08.            "createLink",
09.            "unlink",
10.            "fontSize"
11.        ],
12.        value: message,
13.        encoded: false
14.     });

Regards,

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 26 Oct 2015
1 answer
137 views
Copying data from Excel then pasting into the Spreadsheet works in Chrome and IE but does nothing in Firefox and Edge (Ctrl + V).
Alexander Popov
Telerik team
 answered on 26 Oct 2015
1 answer
93 views

I have a grid that shows all uploaded documents. I want to be able to delete those documents. When I click the delete button I would like a confirmation to popup and then the delete to fire to the server. I have done this before and copied my code from another project. However it is not working and I can't seem to figure out why. 

 

var viewModel = new kendo.observable({
    rfpId: $('#RFPId').val(),
    isContinueEnabled: false,
    documentsDataSource: new kendo.data.DataSource({
        transport: {
            read: {
                url: "/RFP/GetDocuments",
                data: { id: $('#RFPId').val() },
                dataType: "json"
            },
            destroy: {
                url: "/RFP/DeleteDocument",
                dataType: "json"
            },
            schema: {
                model: {
                    fields: {
                        Id: { editable: false, nullable: true},
                        Name: { type: "string" },
                        CreateDate: { type: "date" }
                    }
                }
            }
    },
    pageSize: 10,
    serverPaging: false,
    serverFiltering: false,
    serverSorting: false
}),
    reloadDocuments: function () {
        this.get("documentsDataSource").read();
    }
});

 

    $("#GridUploadedDocuments").kendoGrid({
        dataSource: viewModel.get("documentsDataSource"),
        filterable: false,
        sortable: false,
        pageable: true,
        scrollable: false,        
        columns: [
            { field: "Name", title: "Name"},
            { field: "CreateDate", title: "Date/Time", width: "150px", template: "#= kendo.toString(kendo.parseDate(CreateDate, 'MM-dd-yyyy hh:mm tt'), 'MM-dd-yyyy hh:mm tt') #" },
            { command: ["destroy"], title: "&nbsp;", width: "120px" }],
        editable: {
            update: false,
            destroy: true,
            mode: "inline"
        }
    });

 

 

I have no errors in Firebugs. I have Fiddler open and no attempt to hit the server is being made. I am sure it is a simple error. 

Alexander Popov
Telerik team
 answered on 26 Oct 2015
2 answers
1.1K+ views

Hello

 

I'm currently developing a bar chart with the time on the X-axis and series which can contain empty values for that date. I'm filling the bar chart with data from a database which has a date field for the x-axis, value field for the y-axis and multiple fields for the x-axis depending on the selected series option.

 

Now I've encountered the following problem when working with series: (to get a view on my database open the Data.png attachment)

When I don't have an effective date for a serie (type in my case) in a month the chart will show the data incorrectly. Instead of not displaying the serie on Sep '14 the chart will still show it there (as you see in the Barchart.png indicated with the arrows). As you can see the row for type 'Procurement' for Dec '14 is also not showing.

 

My datasource for my bar chart looks like this:

var dataSource = new kendo.data.DataSource({
            data: rows,
            group: [{
                field: xAxis
            }],
            sort: {
                field: "EffectiveDate",
                dir: "asc"
            },
            schema: {
                model: {
                    fields: {
                        EffectiveDate: {
                            type: "date"
                        },
                        Value: {
                            type: "number"
                        }
                    }
                }
            }
        });

My chart configuration looks like this:

overview = $("#overview").kendoChart({
        theme: "metro",
        dataSource: {
        },
        title: {
            text: "Contract " + selectvalueYaxis + " per " + selectvalueXaxis
        },
        legend: {
            position: "top"
        },
        seriesDefaults: {
            type: "column"
        },
        series: [{
            field: "Value"
        }],
        valueAxis: {
            labels: {
                format: "{0}",
            }
        },
        categoryAxis: {
            field: "EffectiveDate",
            baseUnit: ""
        },
        tooltip: {
            visible: true,
            format: "{0}",
            color: "white"
        },
        render: function (e) {
            // Clear up the loading indicator for this chart
            kendo.ui.progress($("#overview"), false);
        },
        chartArea: {
            background: "transparent"
        }
    });

How do I configure my datasource to skip these series on the x-axis. Is this not possible in the current version or is my datasource configured wrong?

 

Thanks.

 

 

 

Terry
Top achievements
Rank 1
 answered on 26 Oct 2015
4 answers
453 views
Hey there,

I read a blog article from Burke Holland (http://blogs.telerik.com/kendoui/posts/14-02-26/a-few-angular-kendo-ui-best-practices) and in the chapter "Leverage Widget References" he says, that the widget reference to the grid is provided inside the scope.

But when I use this html snippet:

<div kendo-grid="grid" k-options="mainGridOptions"></div>

and try to use $scope.grid in my controller, it is undefined.


Would you please provide an example how to get the widget reference?

Thanks a lot!
Kiril Nikolov
Telerik team
 answered on 26 Oct 2015
3 answers
414 views

Hi!

 

I have a simple grid set up, like this:

 

$('#assessment-list').kendoGrid({
    columns: [
        { field: 'CreatedDate', title: 'Dato for henvendelse', template: '#= kendo.parseDate(CreatedDate, "yyyy-MM-ddTHH:mm:ss.ff") #', format: "{0: dd-MM-yyyy}" },

<<more cols>>

    ],
    dataSource: {
        transport: {
            read: {
                url: ​<<api endpoint>>,
                dataType: 'json'
            }
        }
    },
    sortable: true,
    pageable: {
        info: false
    },
    filterable: true
});

...and that date field refuses to do what I want.

The date comes from an api as json, so the grid datasource gets it as a string. I thought using a template was the way to "pre-process" it into a date to let the grid work right, but no luck. Problems:​

1) The date is parsed fine, but the output is, eg., Wed Oct 21 2015 14:12:00 GMT+0200 (Romance Standard Time), which is less than useful as this ignores both the format of the field and the current kendo.culture: "da-DK".

2) The filter menu (which does obey the culture setting and is nicely translated) treats the column data as string, having starts-with and ends-with options but no less-than / greater-than as you'd expect when working with dates.

 

I can call kendo.toString() in the template to fix the display issue, but this leaves the filter treating the column values as string. Can anyone explain how to configure this to fix both problems, or show me some other way to process the data from the datasource, please?

 

TIA

Tonny
Top achievements
Rank 1
 answered on 26 Oct 2015
1 answer
172 views

Is there any option to resize the columns not just by dragging and dropping the header's borders, but also using the whole column border line - running the vertical height of the grid?

Rosen
Telerik team
 answered on 26 Oct 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?