Telerik Forums
Kendo UI for jQuery Forum
1 answer
361 views

I've been working with adding some custom binders, via typescript, to our project. All of the examples show that overriding the 'init' function is how I am supposed to parse attributes from the elements into (e.g.) custom properties. The issue I'm having is that the overridden 'init' function *never* seems to be called. If I switch to overriding the constructor, instead of init, this works as expected.

My question is - am I doing this incorrectly, is there anything inherently wrong with overriding the constructor itself, and *why* doesn't the override on init actually fire? I've tried this several ways, at this point I'm exactly duplicating the structure from kendo.d.ts, going with the assumption that the override might not fire if typescript doesn't see an exact match.

Again, note that the below extension is working - BUT if I were to remove the constructor override, the init override would never be called (confirmed via multiple debugging attempts).

module kendo.data.binders {
    export class date extends kendo.data.Binder {
        dateformat: string = "d";
 
        constructor(element: any, bindings: Bindings, options?: BinderOptions) {
            //call the base constructor
            super(element, bindings, options);
 
            this.dateformat = $(element).data("dateformat");
        }
 
        //Note: this NEVER seems to be called
        init(element: any, bindings: Bindings, options?: BinderOptions): void {
            //call the base constructor
            kendo.data.Binder.fn.init.call(this, element, bindings, options);
 
            this.dateformat = $(element).data("dateformat");
        }
 
        refresh() {
            var data = this.bindings["date"].get();
            if (data) {
                var dateObj = new Date(data);
                $(this.element).text(kendo.toString(dateObj, this.dateformat));
            }
        }
    }
}
Dimiter Topalov
Telerik team
 answered on 01 Feb 2017
1 answer
222 views

Hi everybody,

I'm using a kendo dropdown list as a custom editor in grid. I wonder, is there an easy way to make the width of dropdownlist bigger then the size of the cell? I display short codes in a grid, but I have to display long names in edit mode in dropdown list. I thought about something like openning  it in front of the grid, covering the whole grid not only the container cell. But I was unable to find an example.

 

Dimo
Telerik team
 answered on 01 Feb 2017
1 answer
602 views

I have a custom event editor template for a scheduler. I have certain components in my template I want hidden until the user selects a certain recurrence value from the dropdown. If they select daily, weekly, monthly, or yearly, different input values should become visible to them under the recurrence selector (using kendo's recurrenceeditor component).

 

I am wondering where I get the recurrence html object, in the script activating the scheduler (main script) or the script that holds the template for the editor? Then how do I set an event to catch when the value of the recurrenceeditor changes to hide/reveal the components I want?

 

Thank you for any help!

Peter Milchev
Telerik team
 answered on 31 Jan 2017
1 answer
222 views

accoring to the documentation the grid has a group event, but no unGroup event.

How can I detect if a grid is in a grouped state?

Tsvetina
Telerik team
 answered on 31 Jan 2017
3 answers
358 views

I'm using a grid's edit event to modify the title of the popup kendo ui window.

This code worked fine in 2016.1.226, but now in 2017.1.118 it does not.  After upgrading, the title now looks disabled and the window acts as if it doesn't have a title bar at all (cannot be dragged, cannot be closed by the X, etc).

function gridEdit(e) {
    if (e.model.isNew()) {
        e.container.kendoWindow("title", "Add New User");
    }
    else {
        e.container.kendoWindow("title", "Edit User");
    }
}
Greg
Top achievements
Rank 1
Iron
 answered on 31 Jan 2017
1 answer
1.4K+ views

Hello 

I'm using KendoUI Tooltip and attach them by class name, what works fine. There are now situations I have to hide Tooltips. So therefore I thought I can use the hide function of Tooltip but it hides its element as well:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Tooltip hide test</title>
 
        <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css">
        <script src="http://kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"></script>
 
        <script>
            $(document).ready(function() {
                // Attach tooltip to all elements with class = mytooltip
                $(".mytooltip").kendoTooltip({ content: 'Enter something here' });
 
                // Hide tooltip on clicking button
                $("#hideTooltip").click(function() {
                    $(".mytooltip").kendoTooltip().hide();
                });
            });
        </script>
    </head>
    <body>
 
        <div id="container">
            <input type="text" id="inputfield" class="mytooltip">
        </div>
 
        <button id="hideTooltip" style="margin-top: 30px;">Hide tooltip</button>
 
    </body>
</html>

 

This code sample does show an input element on which a Tooltip is attached, works fine. If you then press the button that should hide the Tooltip it also hides the input element. What am I doing wrong?

 

 

Marin Bratanov
Telerik team
 answered on 31 Jan 2017
3 answers
184 views

I am having trouble make a chart wider. My html & JS is below:

<div class="demo-section k-content wide" style="width: 100%">
<div id="indepthGraph"></div>
</div>

$("#indepthGraph").kendoChart({

title: {
text: "Graph Shit"
}

});

 

However, when I check developer tools elements tab, I see that my both my div's have disappeared, to be replaced by this <svg> tag. This is fine, however, on your examples http://demos.telerik.com/kendo-ui/bar-charts/multiple-axes - developer tool shows the two divs still there, with the <svg> tag inside the child div.

Thanks

Marc

Eduardo Serra
Telerik team
 answered on 31 Jan 2017
1 answer
954 views

To begin using Kendo UI to work on a calendar, I first am beginning by pulling events from salesforce orgs and just displaying them on the scheduler. However, I am being plagued by "Cannot read property 'getTimezoneOffset' of undefined errors and am looking for help. My JS is:

var data = '{!jsonString}';
                    var scheduler = $('#scheduler').kendoScheduler({
                    date: new Date(),
                        startTime: new Date(),
                        height: 700,
                        timezone: "Etc/UTC",
                        views: [
                            {type: "week", selected: true},
                            "week",
                            "month",
                            "agenda"
                        ],
                        dataSource: {
                            batch: true,
                            transport: {
                                read: function(e){
                                    console.log(data);
                                    e.success(data);
                                },
                                update: {
                    url: "http://demos.telerik.com/kendo-ui/service/tasks/update",
                    dataType: "jsonp"
                },
                create: {
                    url: "http://demos.telerik.com/kendo-ui/service/tasks/create",
                    dataType: "jsonp"
                },
                destroy: {
                    url: "http://demos.telerik.com/kendo-ui/service/tasks/destroy",
                    dataType: "jsonp"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                }
                          },
                          schema: {
                                model: {
                                    id: "OwnerId",
                                    fields: {
                                        taskId: { from: "TaskID" },
                        title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                        start: { type: "date", from: "Start" },
                        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", defaultValue: 1 },
                        isAllDay: { type: "boolean", from: "IsAllDay" }
                                    }
                                }
                            }
                         }
                        //});
                  });

 

And the data variable is JSON in the format:

 

[{"Title":"meeting","TaskId":"00U410000059ZjbEAE","StartTimezone":"Etc/UTC","Start":"2017-01-26","RecurrenceRule":null,"RecurrenceId":null,"RecurrenceException":null,"OwnerId":"005410000020eLnAAI","IsAllDay":false,"EndTimezone":"Etc/UTC","EndTime":"2017-01-26","Description":"a meeting"},{"Title":"meeting","TaskId":"00U410000059ZjcEAE","StartTimezone":"Etc/UTC","Start":"2017-01-26","RecurrenceRule":null,"RecurrenceId":null,"RecurrenceException":null,"OwnerId":"005410000020eU9AAI","IsAllDay":false,"EndTimezone":"Etc/UTC","EndTime":"2017-01-26","Description":"a meeting"}, etc...}]

according to the console.log(data) in the read operation. I have a controller that gets an array of events, then JSON.serializes that array (which is jsonString, which data accesses).

I don't get what the issue with the timezone offset is, all my JSON entry data matches the fields of the tutorial schema and it still doesn't work... I just need the calendar to display all events that currently exist when it is opened by passing this JSON to the read operation. Any help would be incredibly appreciated! Thank you. 

Peter Milchev
Telerik team
 answered on 31 Jan 2017
3 answers
1.7K+ views
I want to make just like Accordion which is uploaded and I tried several time to make an accordion just like given image or window using Kendo UI panelbar tool. But it did not work. I need your support to solve this issue by using Kendo UI panelbar.
Nencho
Telerik team
 answered on 31 Jan 2017
1 answer
859 views

Hi, 

As my title says, im trying to change the icons of the command buttons in my inline grid.

Now I've managed about 73% of the way; by setting the edit icons in the 'dataBound' event and the update icons in the 'edit' event. But when the user clicks 'cancel' (in edit mode) kendo resets the icons to the kendo standard. What event can I trigger after a cancel has completed  to reset the icon to my custom ones?

For Info purposes

dataBound: function(e) {
  $(".k-grid-edit").find("span").removeClass().addClass("fa fa-pencil");
  $(".k-grid-destroy").find("span").removeClass().addClass("fa fa-times");
},
edit: function(e) {
  $(".k-grid-update").find("span").removeClass().addClass("fa fa-check");
  $(".k-grid-cancel").find("span").removeClass().addClass("fa fa-ban");
}

 

Please advise on how I can achieve this or if there is a more efficient way to do the same thing.

Kind Regards,
Grant

Dimiter Topalov
Telerik team
 answered on 31 Jan 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
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
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?