Telerik Forums
Kendo UI for jQuery Forum
3 answers
137 views

We are using bar charts and were looking into ways to customize
the series notes.

Unfortunately, the series/ seriesdefault notes are not able to
handle HTML – the entire widget disappears. 

The tooltip is able to handle them.

We have investigated a number of ways using the latest Kendo
library:
-         Setting the template as a string
-         Setting the template as a function returned by a kendo.template
-         Using kendo.htmlEncode

We have a working example of the tooltip: https://jsfiddle.net/gmL0b1f6/

The goal is to create a series note in the style of the example
tooltip.

 Any help much appreciated.

Kind regards.

Iliana Dyankova
Telerik team
 answered on 21 May 2015
4 answers
300 views
If I disable edit.destroy, in popup details the delete button is still visible...
To solve the problem, I remove the button in the edit event, but is there any another solution? Am I doing something wrong?

<!-- JAVASCRIPT -->
$(function () {
        $("#scheduler").kendoScheduler({
            startTime: new Date("2013/1/1 00:00"),
            editable: {
                template: $("#editor").html(),
                destroy: false,
                update: true,
                create: false,
                confirmation: false
            },
            date: new Date(),
            workDayStart: new Date("2013/1/1 09:00"),
            workDayEnd: new Date("2013/1/1 19:00"),
            height: 500,
            timezone: "Etc/UTC",
            views: [
                "day",
                "week",
                { type: "month", selected: true },
                {
                    type: "agenda",
                    eventTimeTemplate: $("#event-time-template").html()
                }
            ],
            dataSource: {
                transport: {
                    read: {
                        url: "@Url.Action("Read", "Agenda")",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    },
                    update: {
                        url: "@Url.Action("Update", "Agenda")",
                        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 } },
                            titleClean: { from: "TitleClean", defaultValue: "Desconhecido" },
                            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" },
                        }
                    }
                },
                error: function (e) {
                    alert("Erro."); // displays "Invalid query"
                },
            },
            edit: function (e) {
                $('a.k-button.k-scheduler-delete').remove();
            }
        });
    });

<!-- Template -- >
<script id="editor" type="text/x-kendo-template">
    <div class="container">
        <h3><a href="/Agenda/Details/#:data.titleClean#">Event #:data.title#</a></h3>
        <p>
            <label>Name: </label> #:data.description#
        </p>
       <p>
           <label>Begin: <input data-role="datetimepicker" name="start" /></label>
       </p>
       <p>
           <label>End: <input data-role="datetimepicker" name="end" /></label>
       </p>
    </div>
</script>
Rosen
Telerik team
 answered on 21 May 2015
1 answer
287 views

Using the kendo example for angular (http://demos.telerik.com/kendo-ui/grid/angular).

I have a simple kendo ui grid setup (kendo ui and angularjs) with a detail template that retrieves the data properly for the detail template (can see the correct data returned in the browsers developer console, attached as screenshot ) ,

 <div>
    <div 
    kendo-grid
    options="homeGridOptions">  
        <div k-detail-template>
        <div kendo-grid options="detailGridOptions(dataItem)">
        </div>
        </div>  
    </div>
</div>

 

and in the angular controller

   $scope.homeGridOptions = {
        dataSource: $scope.userchartsDS,
        sortable: true,
        pageable: true,
        dataBound: function() {
                    this.expandRow(this.tbody.find("tr.k-master-row").first());
                },
        columns: [
        { 
            field: "chartno",
            title: "Chart"
        }
        ]
    };

    $scope.chartsDS = new kendo.data.DataSource({
         transport: {
           read: {
             url: "http://site.local/api/v1/index.php/user/home",
             dataType: "json"
           }
         }
      });

    $scope.detailGridOptions = function(dataItem) {
                return {
                    dataSource: {
                        type: "json",
                        transport: {
                            read: "http://site.local/api/v1/index.php/products/chart/" + dataItem.chartno + "/20100101/20150515"
                        },

                        filter: { field: "PRODUCT_NAME", operator: "eq", value: dataItem.chartno }
                    },
                    scrollable: false,
                    sortable: true,
                    pageable: true,
                    columns: [
                    { field: "PRODUCT_NAME", title:"chart", width: "56px" },
                    { field: "VERB_CODE", title:"verb code", width: "110px" },
                    { field: "PRODUCT_REF_EN", title:"product" },
                    { field: "VERB_NAME_EN", title: "Verb", width: "190px" }
                    ]
                };
            };

}]);

but the detail template is not populating with the data.  I can see in batarang this information for the detail grids model

{ column:

{ encoded: true

hidden: null

field: PRODUCT_NAME title: Chart

width: 56px

template: #: data.PRODUCT_NAME  # } }

Do I need to explicitly inject the detail template data source array value into the angular scope, it did not appear to be necessary  in the example?

 

Alex
Top achievements
Rank 1
 answered on 20 May 2015
1 answer
433 views

We're using server-side filtering, signal R, Kendo.DynamicLinq ToDataSourceResult, etc.

It applies the grid filters to the IEnumerable brilliantly, except the string comparisons are all case-sensitive. We need these string filters to be case insensitive.

I've uploaded a screenshot of the relevant area of the server-side code. Please advise!

Thanks,

Andrew

 

Boyan Dimitrov
Telerik team
 answered on 20 May 2015
1 answer
141 views
In the core Kendo drag and drop tools, the drop event includes a copy of the originalEvent where you can access ctrlKey and other key modifier attributes.  Is there any way to access this in the TreeView drop event?
Plamen Lazarov
Telerik team
 answered on 20 May 2015
3 answers
209 views

I've figured out how to write a custom sort for a column using:

1.sortable: {
2.  compare: function(a, b) {
3....

However, if I group a field, it doesn't seem to be using the custom sort. Am I doing something wrong or is this not a feature that is currently available?

 Thanks.

Boyan Dimitrov
Telerik team
 answered on 20 May 2015
1 answer
318 views

I am using Scheduler control from Kendo. I am trying to render daily capacity (Hard coded 30% now) in header of each day as shown in below screen. How can I replace hard coded by data from datasource?

Screen Shot

Here is the code I have used. I have HARD CODED 30% in below code

<!DOCTYPE html>
<html>
<head>
<style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
 
<script src="Scripts/jquery.min.js"></script>
<script src="Scripts/kendo.web.min.js"></script>
<script>
    $(function () {
        $('#scheduler').kendoScheduler({
            date: new Date("2013/09/02"),
            dateHeaderTemplate: kendo.template("<u>#=kendo.toString(date, 'dd/M')#</u> - (30%)"),              
        });
    });
</script>
</head>
<body>
    <div id="scheduler"></div>
/body>

  

Now, I will be getting 'percentage' from API, and want to set to datasource, and from datasource i want to render it to header

var datasource = new kendo.data.SchedulerDataSource({
      data:Model.recordCollection // setting data
});
scheduler.setDataSource(datasource);

but this datasource is calendar event related, this will not contain the daily capacity. so how do I set daily capacity data from different datasource?  Multiple datasource supported?

 

Rosen
Telerik team
 answered on 20 May 2015
2 answers
99 views

I'm trying to use a grid control with my own custom editor for one of the columns.

The idea is that when that cell is clicked a separate pop-up window (modal ) is launched that contains a whole load of buttons, clicking on one of those buttons will close the pop-up and put the result of the selection into the cell that was clicked. (see attached screenshot for a better idea)

I'm new to kendoUI and javascript in general, and while I've managed to cobble something together that returns the selected value from the pop-up (into a global variable) I'm a bit stumped as to how to then update the edited cell with the new value. I've tried holding a reference to the selected data item in the grid and setting values there as a result of the button press, but the further I go down this path of trying to force the values in the more I'm sure that I'm working completely against the kendo grid framework and wanted to see what recommendations people had for achieving this sort of functionality.

 

Thanks,

Mark
Top achievements
Rank 1
 answered on 20 May 2015
15 answers
620 views
Hello,

I am using
KendoUI with MVC wrappers. I want to make all Grids in my project to be
exportable to csv/ excel. For this I like to have a generic export function.

I found
following blog post (http://www.kendoui.com/blogs/teamblog/posts/13-03-12/exporting_the_kendo_ui_grid_data_to_excel.aspx) that suits perfectly for me.

However,
this post describe how to make a Grid exportable that is initialised via pure
JavaScript.

Is there
any solution how to make this working for the MVC wrappers?

Thank you

Daniel
Telerik team
 answered on 20 May 2015
1 answer
274 views

Hello,

i've got a problem with persisting the state of a grid.

kendo.stringify($scope.grid.getOptions())

Templates of columns will only be exported if they are defined as strings, external templates or template functions, are ignored.

Is there a proper way to get this working?

 Works:

template: '#: (DeliverDateType) ? DeliverDateType.name : "" #',

Doesn't work:

template: kendo.template($("#colProductionJobValue").html()),
 
template: function (data) {
    var numbers = [];
    for (var i = 0; i < data.ProductionJob.length; i++) {
        if (typeof data.ProductionJob[i].id != 'undefined') {
            numbers.push(data.ProductionJob[i].id);
        }
    }
    return numbers.join(', ');
},

Dimo
Telerik team
 answered on 20 May 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?