Telerik Forums
Kendo UI for jQuery Forum
1 answer
166 views

hello,

selecting a tab programmatically, changes the height of the previous content.

1 run http://dojo.telerik.com/UYiJU

2 click "select moscow" button

3 select  "paris" tab

 

Kind regards

axel

Ivan Danchev
Telerik team
 answered on 03 Apr 2017
0 answers
189 views

Hi there;

I've had great success with a range bar chart putting together a timeline -- but I've reached a stumbling block.  I'm attempting to show machine runability in a manufacturing environment, so in the timeline I want it green when the machine is running, red when it's not.  The timeline just seems to pick the first color though.  Attached is the output I'm getting from Kendo, along with a similar mockup from SSRS showing what I'd like to see.

Does anybody have any advice?

Thanks,

Jason

 

<!DOCTYPE html>
<html>
<head>
    <title>Shift Timeline</title>
    <meta charset="utf-8">
    <link href="content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="styles/kendo.common.min.css" rel="stylesheet">
    <link href="styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="styles/kendo.default.min.css" rel="stylesheet">
    <link href="styles/kendo.default.mobile.min.css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>
    <script src="js/jszip.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
    <script src="content/shared/js/console.js"></script>
    <script>
         
    </script>
     
     
</head>
<body>
     
     
    <div id="chart"></div>
    <div id="timeline"></div>
    <script>
    var bbxData = [
{ID:3565,MachineName:"DC01",StartDate: new Date("2016-03-09 07:15:10").getTime(), EndDate: new Date("2016-03-09 07:15:32").getTime(),color:"Green"},
{ID:3567,MachineName:"DC01",StartDate: new Date("2016-03-09 07:15:32").getTime(), EndDate: new Date("2016-03-09 08:20:11").getTime(),color:"Green"},
{ID:3734,MachineName:"DC01",StartDate: new Date("2016-03-09 08:20:11").getTime(), EndDate: new Date("2016-03-09 08:20:19").getTime(),color:"Green"},
{ID:3735,MachineName:"DC01",StartDate: new Date("2016-03-09 08:20:19").getTime(), EndDate: new Date("2016-03-09 09:08:10").getTime(),color:"Red"},
{ID:3873,MachineName:"DC01",StartDate: new Date("2016-03-09 09:08:10").getTime(), EndDate: new Date("2016-03-09 10:39:29").getTime(),color:"Red"},
{ID:3012,MachineName:"DC01",StartDate: new Date("2016-03-09 10:39:29").getTime(), EndDate: new Date("2016-03-09 10:41:38").getTime(),color:"Yellow"},
{ID:3026,MachineName:"DC01",StartDate: new Date("2016-03-09 10:41:38").getTime(), EndDate: new Date("2016-03-09 10:42:48").getTime(),color:"Yellow"},
{ID:3033,MachineName:"DC01",StartDate: new Date("2016-03-09 10:42:48").getTime(), EndDate: new Date("2016-03-09 10:43:32").getTime(),color:"Green"},
{ID:3039,MachineName:"DC01",StartDate: new Date("2016-03-09 10:43:32").getTime(), EndDate: new Date("2016-03-09 10:43:48").getTime(),color:"Green"},
{ID:3041,MachineName:"DC01",StartDate: new Date("2016-03-09 10:43:48").getTime(), EndDate: new Date("2016-03-09 10:46:26").getTime(),color:"Green"},
];
       
      $("#chart").kendoChart({
                        dataSource: {
          data: bbxData,
          group: {
            field: "MachineName",
            dir: "desc"
          }
                    },
        series: [{
          type: "rangeBar",
          fromField: "StartDate",
          toField: "EndDate",
          categoryField: "MachineName",
          spacing:-1
        }],
        valueAxis: {
          min: new Date("2016/03/09 01:00 AM").getTime(),
          max: new Date("2016/03/09 11:00 PM").getTime(),
          majorUnit: 60 * 60 * 1000 , // 60 minutes in milliseconds
          labels: {
            template: "#= kendo.toString(new Date(value), 'HH:mm') #"
          }
        },
        legend: {
          visible: false
        }
      });
    </script>
</body>
</html>
jmillar
Top achievements
Rank 1
 asked on 31 Mar 2017
1 answer
110 views

When user select an image from the image browser, it inserts to the Editor as next:

<img alt="" src="/Learn/ImageBrowser/Image?path=Chrysanthemum_636263051836972436.jpg" />

While adding the image we also can set Alt text, Width, Height.

But how to add class to <img> tag? 

Result has to be like: <img class="img-responsive" alt="" src="/Learn/ImageBrowser/Image?path=Chrysanthemum_636263051836972436.jpg" />

 

Ianko
Telerik team
 answered on 31 Mar 2017
3 answers
255 views

Hi team,

The complete event is not fired after a remove operation. Why ?

I need to do some data consolidations after a remove operation by looping thru .k-file.k-file-success <li>

At present (kendo 2016.1.226), I was using the success event to do so, and it was ok.

Now (updrade to kendo 2017.1.223), It seems that a .k-file.k-file-success <li> removal is deffered and so is still present on success event.

 

Please advise,

 

Best regards.

 

 

Ivan Danchev
Telerik team
 answered on 31 Mar 2017
3 answers
583 views
I'm trying to use some of Kendo's Grid options together.
I have created a row template with some fields, but I can't find how to include edit and delete buttons in the custom row template.

<script id="rowTemplate" type="text/x-kendo-tmpl">
    <tr data-uid="#: uid #">
        <td>
            <span>#: Name #</span>
        </td>
        <td>
            <span>#: CreatedBy #</span>
        </td>
        <td>
            <span>#: kendo.format("{0: dd-MMM-yyyy}", CreatedDate) #</span>
        </td>
        <td>
            <span>#: InUse #</span>
        </td>
        <td>
     HOW DO I GET THE COMMAND BUTTONS HERE?
        </td>
    </tr>
</script>
My datagrid configuration has the following columns:
columns: [
        { field: "Name", title: "Skill", width: "130px" },
        { field: "CreatedBy", title: "Created by", width: "130px" },
        { field: "CreatedDate", title: "Created at", width: "130px" },
        { field: "InUse", title: "In use?", width: "130px" },
        { command: ["edit", "destroy"], title: " " }
]
If I don't include the rowtemplate in de datagrid configuration, the edit and delete button do show up.
But I need the template:
rowTemplate: kendo.template($("#rowTemplate").html())
Because I want to add custom classes to my fields and rows or put multiple values in one row.

Any help would be appreciated!
Viktor Tachev
Telerik team
 answered on 31 Mar 2017
1 answer
241 views
I'm having trouble finding much in the way of documentation on the split button, but, given this demo: http://demos.telerik.com/kendo-ui/toolbar/events, let's say that I select Action 2 from the splitButton, and when I reopen the splitButton I want to indicate that Action 2 is what is currently selected, how might I go about that?
Ivan Danchev
Telerik team
 answered on 31 Mar 2017
1 answer
206 views

Im using the Kendo UI Editor and I'd like to dynamically display QrCodes into the Editor.

So Ive added a Custom Tool Button item that calls the following method:

function insertQRCodeTest() {
    var editor = getEditor();
    var qrCodeDiv = "<div id='qrCode1'></div>";
    editor.exec("insertHtml", { html: qrCodeDiv, split: false });
 
    $("#qrCode1").kendoQRCode({
      value: " my data here...",
      errorCorrection: "M",
      size: 120,
      border: {
        color: "#000000",
        width: 5
      }
    });
  }

 

The qrCode1 div is added however the QrCode is not genearted\displayed - is this even possible?

Ianko
Telerik team
 answered on 31 Mar 2017
6 answers
520 views
Marketing has specific design in mind for my bullet chart. I'm using a vertical Bullet Chart. I want Labels on the top like the Bar Graph.  Oh did I mention I'm using ICENUM to do the bullet chart on the phone. 

I've tried to add the labels property found in the documentation;

 series: [
                    labels:
                   { 
                       visible: true,
                      format: "{0}",
                      font: "14px Arial",
                 },

It's not working for me. 

Here is my complete script: 

$("#bar-chart").kendoChart({
                theme: global.app.chartsTheme,
                renderAs: "svg",
                legend: {
                    position: "bottom"
                },
                seriesDefaults: {
                    type: "column"
                },
                series: [
                    {   
                        type: "verticalBullet",
                        color: "#d87635",
                        currentField: "score",
                        targetField: "average",
                        labels:
                       {
                           visible: true,
                           format: "{0}",
                           font: "14px Arial",
                       },
                        target: {
                            color: "#444",
                            dashType: "dot",    // I want a dotted line too. That isn't working either.
                            line: {
                              width: 1,
                            }        
                        },                       
                        data: [
                           {
                                score: 93.7,
                                average: 65.2,                              
                            }, {
                                score: 80.2,
                                average: 22.2,
                            }, {
                                score: 60.8,
                                average: 35.2,
                            }, {    
                                score: 82.1,
                                average: 45.2,                                
                            }, {
                                score: 74.2,
                                average: 55.2,
                            }
                        ]
                    }
                ],
                categoryAxis: {
                    labels: { rotation: -45 },
                    categories: ["Sales & Contracting", "Implementation & Training", "Functionality & Upgrades", "Service & Support", "General"],
                    line: {
                        visible: false
                    },
                    color: "#444", 
                    axisCrossingValue: [0, 0, 100, 100]
                },
                 tooltip: {
                    visible: false
                }
            }).data("kendoChart");

Any Help would be greatly appreciated. 
Preslav
Telerik team
 answered on 31 Mar 2017
2 answers
194 views

Hello,

 

Im triyng to build a schedular that has a different template for an existing event, but also return the standard create event template when it's a new event.

 

var d = new Date();
    d.setHours((d.getHours() - 4), 0, 0, 0);
    $("#scheduler").kendoScheduler({
        date: new Date(),
        startTime: d,
        views: [
            "day",
            { type: "workWeek", selected: true },
            "week",
            "month",
            "agenda",
            { type: "timeline", eventHeight: 50 }
        ],
        editable: {
            template: function (
                if (e.taskId > 0) { // check if new or existing task by e.taskId
                    return $("#contactForm").html();
                }
                return // this is where i want to return the standard template.....
            }
        },
        edit: function (e) {
            var buttonsContainer = e.container.find(".k-edit-buttons");
            var cancelButton = buttonsContainer.find(".k-scheduler-cancel");
            var saveButton = buttonsContainer.find(".k-scheduler-update");
            saveButton.html($("#contactForm .k-buttons .add-button")[0]);
            cancelButton.html($("#contactForm .k-buttons .cancel-button")[0]);
 
        },
        timezone: "Etc/UTC",
        dataSource: {
            transport: {
                read: {
                    url: "/api/calendar/GetAgendaItems",
                    contentType: "application/json; charset=utf-8",
                    method: "GET",
                    dataType: "json",
                    isASPNETPost: false,
                    data: { EmployeeId: '71' }
                },
                update: {
                    url: "/api/calendar/UpdateAgendaItem",
                    method: "PUT",
                    dataType: "json"
                },
                create: {
                    url: "/api/calendar/CreateAgendaItem",
                    method: "",
                    dataType: "json"
                },
                destroy: {
                    url: "/api/calendar/AgendaItem",
                    method: "DELETE",
                    dataType: "json"
                },
                parameterMap: function (options, operation) {
                    console.log(kendo.stringify(options), operation);
 
                    if (operation !== "read" && options.models) {
                        return options.models[0];
                        //return kendo.stringify(options);
                    }
                    return options
                }
            },
            schema: {
                model: {
                    id: "taskId",
                    fields: {
                        taskId: { from: "taskID", type: "number" },
                        title: { from: "title", defaultValue: "No title", validation: { required: true } },
                        start: { type: "date", from: "startTime" },
                        end: { type: "date", from: "endTime" },
                        startTimezone: { from: "startTimezone" },
                        endTimezone: { from: "endTimezone" },
                        description: { from: "description" },
                        recurrenceId: { from: "recurrenceID" },
                        recurrenceRule: { from: "recurrenceRule" },
                        recurrenceException: { from: "recurrenceException" },
                        ownerId: { from: "ownerID" },
                        isAllDay: { type: "boolean", from: "isAllDay" }
                    }
                }
            }
        },
        resources: [
            {
                field: "ownerID",
                title: "HomeVisitor",
                dataSource: {
                    transport: {
                        read: {
                            url: "/api/calendar/GetEmployees",
                            method: "GET"
                        }
                    }
                }
            }
        ]
    });

 

Ivan Danchev
Telerik team
 answered on 31 Mar 2017
1 answer
250 views

Hello,

is there any way to customize "timeline month" (or any other view) so that it shows

each day (in selected month) in its own row. Check image...

Is there any different view or some other control that I can use for my problem...

Thank you.

Ivan Danchev
Telerik team
 answered on 31 Mar 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?