Telerik Forums
Kendo UI for jQuery Forum
4 answers
411 views

I'm working through a project utilizing the Kendo UI Scheduler.  I am trying to decide how to best handle the RecurrenceExceptions for recurring events. The recurring events work perfectly fine and I think I have my head wrapped around handling sine exceptions, but what about multiples?

For instance, we have a meeting that happens every Tuesday:

 RecurrenceRule is "FREQ=WEEKLY;INTERVAL=2;BYDAY=TU"

If someone wanted to cancel this once, the RecurrenceException would look something like this:  "20150519T140000Z;"

* from my understanding, the RecurrenceException tells the scheduler not to show the recurring event on this date/time.

What about multiples times?  Do I really have to parse an ever-growing delimited by a semicolon?  That doesn't seem very practical in the long run.  Yes I get it will be awhile before it becomes a problem, but is there a better way to handle this than splitting a long string in the database?

It would seem to me that the better way would be to reference the original recurrence in a new event and then designate the rule there that would pertain to the first one.  It makes more sense to me to have multiple entries that are exceptions to the rule rather than track all the exceptions in one field.

What's a practical way around this?

Phil
Top achievements
Rank 1
 answered on 26 May 2015
1 answer
157 views

I want to present my HTML content as a easily viewed and SELECTABLE block of text.  Then if the user clicks a button, OR double-clicks... the "inline edit" mode engages.  I can build something custom to do this, I think - but before I do I wanted to see if anyone knew of an easy way to :

1.) Disable inline edit on single-click

2.) Enable it on double-click

3.) Enable it on the click of an outside "edit" button I create.

 

Thanks!

Kiril Nikolov
Telerik team
 answered on 26 May 2015
1 answer
132 views

Hi,

How do I add Step programmatically using a json ?

 My chart

$("#graficos").kendoChart({
               dataSource: {
                   transport: {
                       read: {
                           url: "/Graficos/VendasProdutos/"+id,
                           contentType: "application/json"
                       },
 
                       parameterMap: function (data, operation) {
                           return JSON.stringify(data);
                       }
                   }
               },
               title: {
                   text: "Produtos Vendas"
               },
               legend: {
                   position: "bottom"
               },
               seriesDefaults: {
                   type: "line"
               },
               series: [{
                   field: "qtde",
                   name: "Quantidade",
                   noteTextField: "extremum",
                   notes: {
                       label: {
                           position: "outside"
                       },
                       position: "bottom"
                   }
               }],
               valueAxis: {
                   line: {
                       visible: false
                   }
               },
               categoryAxis: {
                   field: "MesAno",
                   labels: {
                       rotation: -45,
                       step: -> Here Add programmatically in json
                   },
                   majorGridLines: {
                       visible: false
                   }
                    
               },
               tooltip: {
                   visible: true,
                   template: "Mês/Ano -#= category  # - #= series.name #: #= value #"
               }
           });

 

T. Tsonev
Telerik team
 answered on 26 May 2015
1 answer
381 views

Hi all,

How to represent the following in ASP MVC cshtml way - Html.Kendo().Button :

<button data-bind="click: enableInput, enabled: isNameEnabled">Enable</button>

Assuming kendo.observable has been implemented.

Thanks,

Tiago

Alexander Popov
Telerik team
 answered on 26 May 2015
1 answer
93 views
Please advise if it is possible to set grid to load data by user request only. I want allow user to load saved setting using .setOptions() and then load data by pressing some button.  I know how to reload data using sync() method but I don't know how to prevent grid from load data automatically.
Kudryk
Top achievements
Rank 1
 answered on 26 May 2015
1 answer
133 views

Hi,

Is it possible to have an axis with major ticks which are aligned to show each day, and minor ticks which show every few hours, but have different label formats for each?  For example the major tick might say Mon 21, Tue 22 etc and the minor tick label might say 3AM, 6AM, 9AM...

Thanks!

Iliana Dyankova
Telerik team
 answered on 26 May 2015
1 answer
795 views

Hi All,

 I'm trying out the grid component and I'm running into a bit of an issue with AngularJS (1.3.15).  

Everything was working fine until this morning when all of a sudden when k-on-change gets called when selecting a row I'm getting the following error:  

TypeError: undefined is not a function (evaluating 'o[n].call(r,t)') 

Which is coming from the unbind function in kendo.core at around line 228.  As best I can tell from debugging it looks like the issue is happening in jquery during an event dispatch returning undefined. What I can't figure out is why this is happening now.  The grid works fine, loads data, pages, sorts and k-on-select was working properly. 

 Anyone ever seen this, thoughts on what the issue might be?

 Thanks!
Jason

Kiril Nikolov
Telerik team
 answered on 26 May 2015
1 answer
367 views

I'm evaluating the Kendo UI Gantt chart to see if it fits our project requirements.One particular requirement is to display a status column which would be a drop down in edit mode and has three statusesRed 2. Green 3. Yellow, along with an image indicator something like what is shown in the image1 below 

 

I am able to achieve the above effect when i edit a cell after using a custom editor for the drop down

 

function statusDropDownEditor(container, options) {
        $('<input data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                dataTextField: "Status",
                dataValueField: "StatusId",
                valueTemplate: '<img class="selected-value" src="#:data.Url#" alt="#:data.Status#" /><span>#:data.Status#</span>',
                template: '<img class="selected-value" src="#:data.Url#" alt="#:data.Status#" /><span>#:data.Status#</span>',
                dataSource: {
                    transport: {
                        read: function (e) {
                            // on success
                            e.success([{ Status: 'Not Started', StatusId: '0', Url: 'Image/red.png' }, { Status: 'Red', StatusId: '1', Url: 'Image/red.png' }, { Status: 'Green', StatusId: '2', Url: 'Image/red.png' }, { Status: 'Yellow', StatusId: '3', Url: 'Image/red.png' }]);
                            // on failure
                            //e.error("XHR response", "status code", "error message");
                        }
                    }
                }
            })
    }

The Gantt Column for Status looks like the below snippet

 

{ field: "status", title: "Status", editable: true, width: 150, editor: statusDropDownEditor, template: '<img class="selected-value" src="#:data.Url#" alt="#:data.Status#" /><span>#:data.Status#</span>' }

However when done with selecting a particular item from drop down and on exiting the edit mode this is how the cell looks like(image2) Seems like the default cell template in read only mode does not render html and the invokes the toString of the object bound to the cell, is there a way to fix this in the kendo UI Gantt

Dimitar Terziev
Telerik team
 answered on 26 May 2015
2 answers
761 views

Hi There,

I have an issue with date formatting in scheduler. I need to change the recurrence end date to have same format as the start and end date. I have attached a screen shot from my work where the end date highlighted in green.

Below is the script template use for the popup window:

 

<script type="text/x-kendo-template" id="CustomEditorTemplate">
     <style type="text/css">
        label{
            font-weight: normal;
            font-family: arial;
        }
        .k-recur-weekday-checkbox{
            margin-right: 0 !important;
        }
        
        
    </style>

    <div class="k-edit-label">
        <label  for="Start">Start</label>
    </div>
    <div data-container-for="start" class="k-edit-field">
        <input name="start" required="required" style="z-index: inherit;" type="datetime"
            data-bind="value:start,invisible:isAllDay" 
            data-format="dd-MMM-yyyy h:mm tt" 
            data-role="datetimepicker" />

        <input name="start" required="required" type="date" style="z-index: inherit;"
            data-bind="value:start,visible:isAllDay"
            data-format="dd-MMM-yyyy"
            data-role="datepicker" />

        <span data-bind="text: startTimezone"></span>
        <span data-for="start" class="k-invalid-msg"></span>
    </div>

    <div class="k-edit-label">
        <label for="End">End</label>
    </div>
    <div data-container-for="end" class="k-edit-field">

        <input name="end" required="required" style="z-index: inherit;" type="datetime"
            data-bind="value:end,invisible:isAllDay" 
            data-format="dd-MMM-yyyy h:mm tt" 
            data-role="datetimepicker" />

        <input name="end" required="required" type="date" style="z-index: inherit;"
            data-bind="value:end,visible:isAllDay"
            data-format="dd-MMM-yyyy"
            data-role="datepicker" />

        <span data-bind="text: endTimezone"></span>
        <span data-for="end" class="k-invalid-msg"></span>
    </div>

    <div class="k-edit-label">
        <label for="IsAllDay">All Day?</label>
    </div>
    <div data-container-for="isAllDay" class="k-edit-field">
        <input data-bind="checked:isAllDay" name="IsAllDay" type="checkbox" value="true" />
    </div>  
    
    <div class="k-edit-label">
        <label for="Type">Type</label>
    </div>
    
    <div data-container-for="Type" class="k-edit-field">
        <div id="resourcesContainer">        
        </div>
    </div>

    <div class="k-edit-label">
        <label for="recurrenceRule">Repeat</label>
    </div>
    <div data-container-for="recurrenceRule" class="k-edit-field">
        <div data-bind="value:recurrenceRule" id="recurrenceRule" name="recurrenceRule" data-role="recurrenceeditor"></div>
    </div>

    <div class="k-edit-label">
        <label for="description">Description</label>
    </div>
    <div data-container-for="description" class="k-edit-field">
        <textarea class="k-textbox" cols="18" data-bind="value:description" id="description" name="description" rows="1">
    </textarea>
    </div>

    

     <script>
       jQuery(function() {
            var container = jQuery("\#resourcesContainer");
            var resources = jQuery("\#scheduler").data("kendoScheduler").resources;
            
            for( resource = 0; resource<resources.length; resource++) 
            { 
                if(resources[resource].multiple)
                {
                   jQuery(kendo.format('<select data-bind="value: {0}" name="{0}">', resources[resource].field))
                     .appendTo(container)
                     .kendoMultiSelect({
                         dataTextField: resources[resource].dataTextField,
                         dataValueField: resources[resource].dataValueField,
                         dataSource: resources[resource].dataSource,
                         valuePrimitive: resources[resource].valuePrimitive,
                         itemTemplate: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField),
                         tagTemplate: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField)
                     });
            
                } else {
                   jQuery(kendo.format('<select data-bind="value: {0}" name="{0}">', resources[resource].field))
                    .appendTo(container)
                    .kendoDropDownList({
                        dataTextField: resources[resource].dataTextField,
                        dataValueField: resources[resource].dataValueField,
                        dataSource: resources[resource].dataSource,
                        valuePrimitive: resources[resource].valuePrimitive,
                        optionLabel: "None",
                        template: kendo.format('<span class="k-scheduler-mark" style="background-color:\#= data.{0}?{0}:"none" \#"></span>\#={1}\#', resources[resource].dataColorField, resources[resource].dataTextField)
                     }); 
                }
            }     
        })        
    <\/script>
</script>

 

I tried to add kendo culture but no luck.

Could please someone help me to change it?

Thanks.

Benjamin
Top achievements
Rank 1
 answered on 26 May 2015
3 answers
2.1K+ views
I have a MultiSelect bound via Ajax to a server controller. The MultiSelect properly shows the server data
and provides filter criteria from the keyboard. But when the control is initialized, if I provide values to it they are not visible until after I click inside the Multiselect control. If I provide a value for the Placeholder text, only the first tow characters of it are displayed until I click on the control. After selecting the control, the initial values are displayed and it all works as expected. The control is defined with an Mvc helper, the ViewBag.TagArray in the snippet below is a string array with the values that should be displayed as already selected.

thanks in advance for any help

@(Html.Kendo().MultiSelect()
               .Name("ajaxTags")
               .Placeholder("Select tags...")
               .AutoBind(false)
               .DataTextField("Subject")
               .DataValueField("Name")
               .Filter("contains")  
               .DataSource(source =>
                {
                   source.Read(read =>
                   {
                       read.Action("AjaxGetTags", "Tag"); 
                   });
                   source.ServerFiltering(true);
                   source.Events(events => events.Error("kendoOnError"));
                })
               .HtmlAttributes(new { style = "width: 99%;" })
               .Value(ViewBag.TagArray)
               )
Georgi Krustev
Telerik team
 answered on 25 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?