Telerik Forums
Kendo UI for jQuery Forum
6 answers
191 views

Thank you as always!

Is there a way to move the labels of CategoryAxis to the middle when setting step to CategoryAxis?

https://dojo.telerik.com/iWeWeDUs

kako
Top achievements
Rank 1
 answered on 24 May 2018
10 answers
222 views

Hi.

It acquires e.dataItem in the SeriesClick event and displays the acquired data with an alert.

So, is there a way to make the background of the series clickable?

kako
Top achievements
Rank 1
 answered on 24 May 2018
5 answers
2.1K+ views

Hi, I want to change kendo ui scheduler event color programmatically based on a logic. please find the sample implementation in below. 

http://dojo.telerik.com/@lilan123/UPuDE/4

 

What I want is when I click on create button I want to add events and every event should have a different color. i tried to create the event as below adding color option but it doesn't work that way. 

 //Code 

attendees: '1',
start: new Date("2015/6/8"),
end: new Date("2015/6/8"),
title: "Off Day",
isAllDay: true,
color:'#0055A7'

Thanks 

Lilan

Bill
Top achievements
Rank 1
 answered on 23 May 2018
4 answers
1.8K+ views

Hello,

I have implemented the kendo UI drop down list in jQuery making use of the no data template too add a new item when the search returns no results.  My no data template is defined as follows:

 

    <script id="noDataTemplate" type="text/x-kendo-tmpl">
        <div>
            <button class="k-button" onclick="addNew('#: instance.filterInput.val() #')">Add</button>
        </div>
    </script>

and the JS function it calls:

 

 function addNew(newItemName) {
           alert(newItemName);

       //logic will go here to add the new item to the drop down list

        }

 

This works perfectly, however if the text typed into the search bar contains an apostrophe the button becomes unresponsive. Is there any way to escape the apostrophe so that the function is still called successfully, and the paramter 'newItemName' will still contain the apostrophe, as the name for the new item can validly contain one.

Many thanks

newKendoUser
Top achievements
Rank 1
 answered on 23 May 2018
1 answer
353 views

We have a customer that has several sizing requests in regards to having the scheduler in month view automatically resize to show all data (show everything regardless of size). The default static positioning/height/width using tables will not work for them.

For events, if their name wraps 2,3,4,... lines, they want the event box to auto-grow its height to show all text. The static EventHeight setting will not do.

The days that show/hold the events, needs to auto grow their height as well to fit in all events, even if there are 10 events for 1 day. They don't want the "..." to switch over to the day view from the month view to see all. So likely the row for that week would auto-grow to be able to hold the 1 day with 10 events.

Any resources/thoughts on how we may approach this?

Ivan Danchev
Telerik team
 answered on 23 May 2018
3 answers
379 views

    Hello Telerik Team,

I have signed up for a Trial of Kendo UI JS to check out whether your product will solve a business case we are trying to build with a web application.

I have an issue with filtering on the values of the graphs. 

Please have a look at the following screenshot:

chart before filtering

Here, you can see an unfiltered view of an example chart. 

This chart's data comes from a web interface, and for this particular example it is:

[{"Date":"2018-01-02","Name":"Karol","Points":"2","CalculatedValue":"2","CreatedAt":"05/20/2018"},
{"Date":"2018-01-02","Name":"Karol","Points":"6","CalculatedValue":"6","CreatedAt":"05/20/2018"},
{"Date":"2018-01-02","Name":"Peter","Points":"4","CalculatedValue":"4","CreatedAt":"05/20/2018"},
{"Date":"2018-01-06","Name":"Matthew","Points":"8","CalculatedValue":"8","CreatedAt":"05/20/2018"}]


My aggregate is "sum", so for example on 2018-01-02 for "Karol" the sum is 8.

Whenever I want to filter on values greater than 6 on the WHOLE chart suddenly the values of "Karol" are no longer visible. This _makes_ sense becuase there is no single point of data that is greater than 6 for Karol, but since my aggregate is sum, I would have expected for Kendo UI to filter aggregates, and therefore still show me the values for Karol.

chart after filtering

Please look at my setup for the DS and the Chart. Could you please tell me how should I set up the filtering in order to filter on actual aggregate values, instead of their base fractions?


var ds = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "/xx/xxxxx",
                        data: {
                            id: xxx
                        },
                        dataType: "json",
                        type: "post"
                    }
                },
                group: {
                    field: "Name",
                    aggregates: [
                        { field: "CalculatedValue", aggregate: "sum" }
                    ]
                },
                sort: {
                    field: "Date",
                    dir: "asc"
                },
                schema: {
                    model: {
                        fields: {
                            CalculatedValue: {
                                type: "number"
                            },
                            CreatedAt: {
                                type: "date",
                                format: "{0:dd/MM/yyyy}"
                            },
                            "Date": {
                                    
                                type: "date",
                                format: "{0:yyyy-MM-dd}"

                                    
                            }
                        }
                    }
                }
                    ,
                filter: [
                ]
            });


            $("#chart-div-calc-148-_25392").kendoChart({
                theme: "moonlight",
                dataSource: ds,
                seriesColors: [
                    "#0C6BC1", "#06CAEA", "#F7A9F7", "#A00B00", "#FF9900", "#EDED11", "#00E000", "#00722E", "#CF00E9",
                    "#7427D8", "#072DE8", "#FFFFFF", "#878787", "#F43F00"
                ],
                title: {
                    text: "Filter",
                    align: "left"
                },
                legend: {
                    position: "right",
                    cursor: "pointer",
                    orientation: "vertical"
                },
                series: [
                    {
                        type: "line",
                        field: "CalculatedValue",
                        style: "smooth",
                        name: "#= group.value #",
                        categoryField: "Date",
                        aggregate: "sum",
                        labels: {
                            visible: false,
                            format: "{0:N2}"
                        }
                    }
                ],
                tooltip: {
                    visible: true,
                    shared: false,
                    format: "{0:N2}",
                    template: '${series.name}: <b style="font-size: 1.1em"> ${value}</b>'
                    //template: '#= kendo.format("{0:d-MMM-yyyy}", category)#',
                    //template: "${series}: ${value}"
                },

                valueAxis: {
                    labels: {
                        format: "{0:N0}"
                    },
                    title: {
                        text: ""
                    }
                },
                pannable: {
                    lock: "y"
                },
                zoomable: {
                },

                render: function(e) {
                    var loading = $('#chart-loading-148-_25392', e.sender.element.parent());
                    console.dir(this);
                    var totalmax = -6666 + (this._model._plotArea.valueAxis.totalMax * 0.01);


                    if ($(this).data('putPlots') == null) {

                        var axisNames = ["valueAxis"];
                        var options = {};

                        for (var i = 0; i < axisNames.length; i++) {
                            options[axisNames[i]] = { plotBands: [{
                                from: -6666,
                                to: totalmax,
                                color: '#00FF00',
                                opacity: 1
                            }] };
                        }

                        console.dir(options);
                        $(this).data('putPlots', true);
                        this.setOptions(options);


                }
                    kendo.ui.progress(loading, false);
                },
                categoryAxis: {
                    majorGridLines: {
                        visible: false
                    },
                    categoryField: "Date"
                        
                        ,type: "date",
                        baseUnit: "days",
                        //baseUnitStep: "auto",
                        baseUnit: "days"
                        
,
                    labels: {
                            
                            format: "dd-MMM-yyyy",
                            weekStartDay: 1,
                            
                        rotation: "auto"
                    }

                }
            });
        }

 

 

 

 

Thank you in advance for looking into it

Stefan
Telerik team
 answered on 23 May 2018
3 answers
2.7K+ views
Hi Team,

I am using kendo css version : Kendo UI v2014.2.716

But in this the vertical scroll for the grid id not getting affected, it always grows according to data.
Is there any possibility to fix without changing the version?


Thanks
Arathi
Stefan
Telerik team
 answered on 23 May 2018
2 answers
3.3K+ views

Even though many similar topics can be found on the internet, I wasn't able to bind my dropdownlist value within a scheduler template:

 

this is my code within the template:

 

<div class="k-edit-label"><label for="trainerId">Trainer</label></div>

<div data-container-for="trainerId" class="k-edit-field">
    <input id="trainerId" name="trainerId"
           data-bind="value:trainerId"
           data-role="dropdownlist" />
</div>

 

the dropdownlist is beeing created by edit event of scheduler:

 

  // Creating dynamic dropdown
            e.container.find("#trainerId").kendoDropDownList({
                dataTextField: "Text",
                dataValueField: "Value",
                change: function(e) {
                   
                },
                dataSource: {
                    transport: {
                        read: {
                            type: 'post',
                            dataType: "json",
                            url: '@Url.Action("Trainers_List","Trainer")',
                        }
                    }
                }
            });

 

Fiddler shows :

'TrainerId' is listed in the body but has no value.

Instead there are other fields like:

trainer.Disabled,

trainerId.Sorting,

trainerId.Value which actually holds the correct value.

 

What am I doing wrong here?

Dimitar
Telerik team
 answered on 22 May 2018
1 answer
139 views

Hi,

I'm using a custom popup edit template for my grid where I'm using a datetimepicker with data attributes.

I would like to use disableDates function to allow only a range between [PlannedFromTemp, PlannedToTemp], but until now I was not able to pass the "date" argument in the function as in the documentation here.

 

How can I pass the "date" in my test function as in the documentation, but in my concrete custom template?

 <input id="Timefrom" name="Timefrom"
               data-type="date"
               data-role="datetimepicker"
               data-bind="value: Timefrom"
               data-format="dd.MM.yyyy HH:mm"
               data-time-format="HH:mm"
               data-disable-dates="#= test(date, PlannedFromTemp, PlannedToTemp) # " 
             
              />

 

Thank you in advance,

 

 

Alex Hajigeorgieva
Telerik team
 answered on 22 May 2018
8 answers
4.9K+ views

Hello

Based on API documentation there is no method/option to enable/disable action buttons defined in a dialog. 

Is there a way to enable/disable action buttons in a dialog?

Regards

 

Tayger
Top achievements
Rank 1
Iron
Iron
 answered on 22 May 2018
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?