Telerik Forums
Kendo UI for jQuery Forum
1 answer
206 views
We are using kendo mobile with our app and encountered the following issue: Our views are using the data-init to specify one time functions to be called for a view. However our app requires user-login, which means that one user can log in then log out and log in again as other user.

On every login we need to reset the data-init events so they will be called for each user that logs in.

We use it to handle cases where in the same session a user visits the view several time and we need to init the view only once for this session. But on the next login, we also need the init event to be executed once.

We did not find how to reset the init-event in kendo's documentation - so it will fire again after a second (or third...) login.
Kiril Nikolov
Telerik team
 answered on 20 Feb 2015
1 answer
1.4K+ views
Hi,

I have grid with incell editing. How can I turn on edit (enter into editor and set focus) in first cell with button click ?
Venelin
Telerik team
 answered on 20 Feb 2015
1 answer
102 views
Hi,

I have been battling an issue in KendoUI's Grid widget recently. Basically I want to implement state saving for grids, this includes whether a field is hidden or not. I am able to get this working perfectly, except in the case where a field is initialized as "hidden:true".

What I can't work out, is that it seems to work fine in the kendo state save example here:
http://dojo.telerik.com/EBaDE

However, I tried modifying the kendo columnMenu example (I think is a closer match to my case), and I see the same issue as I am seeing in our internal application:
http://dojo.telerik.com/uJiNu/2

Basically the OrderId is set hidden:true, to begin with, now as soon as I get the grid options in the same way I normally would, set hidden:false, then set the grid options back, as you can see in my link above the column has room made for it, but it never appears. Now if you start to hide and show other columns, you get javascript errors.

Is this a Kendo Bug? Or am I doing something wrong? 

This took me a while to work out what was going on, any help would be much appreciated.


Kiril Nikolov
Telerik team
 answered on 20 Feb 2015
10 answers
410 views
Hi,
I have a Grid bound to a DataSource via MVVM.

I select a row in the Grid, accordingly I use this:
var grid = e.sender;
var rowSelected = grid.dataItem(grid.select());
this.set("currentAccount", rowSelected);
Where "currentAccount" holds the currently selected row.

Now, when I do changes on the form fields, they are not being automatically reflected on Grid. I need to call grid.refresh() for the changes to show on grid.

However, when user presses a button "Add new record", I use this:
var newRow = this.get("accRegDatasource").add( this._makeAccountModel( 0 ) ); // add new row to data source => reflected on grid
this.set("currentAccount", newRow); // set new row added as the current account
var row = input_map.grid().find(" tr[data-uid='" + newRow.uid + "']"); // find the row added into grid
input_map.kendoGrid().select(row); // select the row added

Above, I am adding a new empty row. Once I start editing the Form fields, automatically they are being reflected on the Grid without having to call grid.refresh.

Any idea why this behavior?

Thanks
Petur Subev
Telerik team
 answered on 20 Feb 2015
10 answers
183 views
Hi

In following example, how can I add a Boolean field (checkbox like isallday) in the resources rather than a dropdown field?

http://dojo.telerik.com/UkaxO

Many thanks
Vladimir Iliev
Telerik team
 answered on 20 Feb 2015
1 answer
249 views
I'm evaluating whether the radial grid with multiple pointers will do what I need and in order to visually differentiate the pointers, I need to be able to vary the length of each pointer in a tiered fashion. Is it possible to change the length of each of the individual pointers?
Dimiter Madjarov
Telerik team
 answered on 20 Feb 2015
2 answers
422 views
Hello,
I sucessfully built a grid using ColdFusion and am binding it using a remote backend with a ColdFusion cfc. However, the grid filtering dropdown options are greyed out. Underneath 'Show items with value that:' should have options, but they are greyed out. Here is an example: http://dojo.telerik.com/#@korchev/UYEta.

I tried using varius arguments, but everything I have tried to far does not seem to address the problem. Here is my code on the front end:

<!DOCTYPE html>
<html>
<head>
    <title>Kendo Grid Example</title>
    <meta charset="utf-8">
    <link href="/cssweb/common/frameworks/kendoUi/examples/content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="/cssweb/common/frameworks/kendoUi/styles/kendo.common.min.css" rel="stylesheet">
    <link href="/cssweb/common/frameworks/kendoUi/styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="/cssweb/common/frameworks/kendoUi/styles/kendo.default.min.css" rel="stylesheet">
    <link href="/cssweb/common/frameworks/kendoUi/styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="/cssweb/common/frameworks/kendoUi/styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <script src="/cssweb/common/frameworks/kendoUi/js/jquery.min.js"></script>
    <!--<script src="/cssweb/common/frameworks/kendoUi/js/angular.min.js"></script> -->
    <script src="/cssweb/common/frameworks/kendoUi/js/kendo.all.min.js"></script>
    <script src="/cssweb/common/frameworks/kendoUi/examples/content/shared/js/console.js"></script>
   
   
</head>
<body>
   
        <div id="example">
            <div id="grid"></div>
            <script>
                $(document).ready(function() {
     
     // Create the datasource
                    dataSource = new kendo.data.DataSource({
      dataType: "json",
      transport: {
       read:  {
        url: "/cssweb/test/kendo/grid.cfc?method=getUsers", // the cfc component which processes the query and returns a json string.
        dataType: "json" // jsonp is used for cross domain reads.
       },
      },
      <!--- serverSorting: true,
      serverFiltering: true,
      serverPaging: true, --->      batch: true,
      pageSize: 10, // make sure to include a pageSize, or you will get a NaN of NaN of total records on the bottom of the grid.
      schema: {
       data: "data",  // the handle coming from the json respons.
       total: "total", // total is returned in the "total" field of the response.
       model: {
        fields: {
         user_id: { editable: false, nullable: true },
         user_name: { type: "varchar", validation: { required: false, nullable: true, filterable: true} },
         first_name: { type: "varchar", validation: { required: true, nullable: false } },
         last_name: { type: "varchar", validation: { required: true, nullable: false } },
         email: { type: "varchar", validation: { required: false, nullable: true } }
        }
       }
      }
     } );
                       
     // Instantiate the grid
     var grid = $("#grid").kendoGrid({
      autoBind: true,
      dataSource: dataSource, // the datasource above.
      height: 550,
                        filterable: true,
                        sortable: true,
                        pageable: true,
      selectable: "row",
                        columns: [{
                                field:"user_id",
                                filterable: false,
        hidden:true
                            }, {
                                field: "user_name",
                                title: "User Name"
                            }, {
                                field: "first_name",
                                title: "First Name"
                            }, {
                                field: "last_name",
                                title: "Last Name"
                            }, {
                                field: "email",
                                title: "Email"
       }],
       // Open the detail window on row click
       change: function (arg) {
        var selected = jQuery.map(this.select(), function (item) {
         return jQuery(item).find('td').first().text();
        });
        //alert(selected);
        createWindow(selected);
       },                    } );
    } );
    
    // Window script
    function createWindow(id) {
 
       jQuery(document.body).append('<div id="myDynamicWindow"></div>');
      jQuery('#myDynamicWindow').kendoWindow({
      title: "Order Details",
      modal: true,
      resizable: true,
      width: 400,
      content: "window.cfm?Id=" + id,
      close: function() {
       setTimeout(function() {
        jQuery('#myDynamicWindow').kendoWindow('destroy');
       }, 200);
      }
     }).data('kendoWindow').center();
    }
  </script>
 </div>
   
   
</body>
</html>

And this is my ColdFusion cfc object:

<cfcomponent displayname="kendoGrid" hint="Creates a serialized json string to a kendo grid" name="kendoGrid">   
    <cffunction name="getUsers" access="remote" returnformat="json" output="false">
   
        <cfobject component="common.cfc.json.cfjson" name="cfJson">
        <cfobject component="common.cfc.json.arrayCollection" name="arrayCollection">
        <cfobject component="common.cfc.db.cssweb.Users" name="UsersTableObj">
       
        <!--- <cfinvoke component="#UsersTableObj#" method="getUsers" returnvariable="users">
         <cfinvokeargument name="userId" value="1">
        </cfinvoke> --->
        <cfquery name="users" datasource="#thisDatasource#">
         SELECT
            User_Id, User_Name, First_Name, Last_Name, Email
            FROM dbo.Users
            WHERE User_Id < 500
        </cfquery>
       
        <cfinvoke component="#arrayCollection#" method="init" returnvariable="jsonString">
        
        <cfset jsonString.setData(users) />
        <cfset jsonString.setDataHandle(true) />
       <cfreturn jsonString.$renderdata() /> 
        
   </cffunction>
</cfcomponent> 

Any help would be greatly appreciated!

Thanks!
Atanas Korchev
Telerik team
 answered on 20 Feb 2015
1 answer
102 views
Hi all,

I've managed to fill my scheduler its datasource by using my own code which is triggered initially and when the navigate event is triggered.
I've done this to keep the JSON that is being sent as small as possible so that I don't send events which don't matter for what is being looked at.

An example of the JSON looks like the block I've added below.

What I'm trying to do is get rid of the following fieldsl:
- StartTimezone
- EndTimezone
- RecurrenceRule
- RecurrenceID
- RecurrenceException

I'd like to get rid of those fields because I don't use them for anything and I'd like to keep the JSON as small as possible.
I have my own custom event editor template which doesn't use them anyway.

My schedulerEventViewModel implements ISchedulerEvent so it must have those properties defined.
I've tried quite some things like putting [JsonIgnore] attributes above the properties but that does not help as they keep getting serialized.

Anyone got an idea?

Thanks in advance.

Kind regards,
Yannick

[{"TaskID":82785,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424041201000)\/","End":"\/Date(1424073600000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32848,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424073600000)\/","End":"\/Date(1424127599000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":32849,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424131201000)\/","End":"\/Date(1424190600000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":82914,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424190600000)\/","End":"\/Date(1424203200000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":4,"OldPersonID":4,"CallgroupID":1,"PersonName":"Stefan Debing","CallgroupName":"Callgroup1","PersonInitials":"SDE"},{"TaskID":82915,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424203200000)\/","End":"\/Date(1424213999000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":32843,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424221200000)\/","End":"\/Date(1424246400000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32834,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424250000000)\/","End":"\/Date(1424257200000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":32833,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424257200000)\/","End":"\/Date(1424264400000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":4,"OldPersonID":4,"CallgroupID":1,"PersonName":"Stefan Debing","CallgroupName":"Callgroup1","PersonInitials":"SDE"},{"TaskID":32835,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424264400000)\/","End":"\/Date(1424271600000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":82823,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424386801000)\/","End":"\/Date(1424404800000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":82821,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424404800000)\/","End":"\/Date(1424408400000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":4,"OldPersonID":4,"CallgroupID":1,"PersonName":"Stefan Debing","CallgroupName":"Callgroup1","PersonInitials":"SDE"},{"TaskID":82822,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424408400000)\/","End":"\/Date(1424421000000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":32836,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424421000000)\/","End":"\/Date(1424430000000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32841,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424430000000)\/","End":"\/Date(1424440800000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":4,"OldPersonID":4,"CallgroupID":1,"PersonName":"Stefan Debing","CallgroupName":"Callgroup1","PersonInitials":"SDE"},{"TaskID":32840,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424440800000)\/","End":"\/Date(1424447999000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32842,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424447999000)\/","End":"\/Date(1424462400000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32838,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424462400000)\/","End":"\/Date(1424473199000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32832,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424473201000)\/","End":"\/Date(1424494800000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"},{"TaskID":32837,"Title":"No title","Description":null,"State":0,"Start":"\/Date(1424494800000)\/","End":"\/Date(1424505600000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32839,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424505600000)\/","End":"\/Date(1424512800000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":67,"OldPersonID":67,"CallgroupID":1,"PersonName":"Yannick Ariën","CallgroupName":"Callgroup1","PersonInitials":"YAR"},{"TaskID":32850,"Title":null,"Description":null,"State":0,"Start":"\/Date(1424518200000)\/","End":"\/Date(1424557800000)\/","StartTimezone":null,"EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false,"ApplyCallgroupOffsets":false,"PersonID":1,"OldPersonID":1,"CallgroupID":1,"PersonName":"Geert Verbakel","CallgroupName":"Callgroup1","PersonInitials":"GVE"}]
Kenny
Top achievements
Rank 1
 answered on 20 Feb 2015
2 answers
403 views
Hey guys,

I have a requirement stating that when an event is being updated the start and end dates should not be able to be editted in the popup.
In case its a new event ( thus having a TaskID of 0 ) the input controls should be enabled as it is normally.

At the moment I have the following custom edit template:

<script id="customEditorTemplate" type="text/x-kendo-template">
    @*<div class="k-edit-label"><label for="title">Title</label></div>
    <div data-container-for="title" class="k-edit-field">
        <input type="text" class="k-input k-textbox" name="title" required="required" data-bind="value:title">
    </div>*@

    <div class="k-edit-label"><label for="start">Start</label></div>
    <div data-container-for="start" class="k-edit-field" class="disableMe">
        <input type="text" class="disableMe"
               data-role="datetimepicker" 
               data-interval="15"
               data-type="date" 
               data-format="dd/MM/yyyy hh:mm tt"
               data-bind="value:start,invisible:isAllDay" 
               name="start"/>
        <input type="text" data-type="date" data-role="datepicker" data-bind="value:start,visible:isAllDay" name="start" data-format="dd/MM/yyyy" class="disableMe" />
        <span data-bind="text: startTimezone" class="disableMe"></span>
        <span data-for="start" class="k-invalid-msg" style="display: none;" class="disableMe"></span>
    </div>

    <div class="k-edit-label"><label for="end">End</label></div>
    <div data-container-for="end" class="k-edit-field">
        <input type="text" data-type="date" data-format="dd/MM/yyyy hh:mm tt" data-role="datetimepicker" data-bind="value:end,invisible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" />
        <input type="text" data-type="date" data-role="datepicker" data-bind="value:end,visible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" data-format="dd/MM/yyyy" />
        <span data-bind="text: endTimezone"></span>
        <span data-bind="text: startTimezone, invisible: endTimezone"></span>
        <span data-for="end" class="k-invalid-msg" style="display: none;"></span>
    </div>

    <div class="k-edit-label"><label for="isAllDay">All day event</label></div>
    <div data-container-for="isAllDay" class="k-edit-field">
        <input type="checkbox" name="isAllDay" data-type="boolean" data-bind="checked:isAllDay">
    </div>
    
    <div class="k-edit-label"><label for="ApplyCallgroupOffsets">Apply callgroup offsets</label></div>
    <div data-container-for="ApplyCallgroupOffsets" class="k-edit-field">
        <input type="checkbox" name="ApplyCallgroupOffsets" data-type="boolean" data-bind="checked:ApplyCallgroupOffsets">
    </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" 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 name="description" class="k-textbox" data-bind="value:description"></textarea>
    </div>
    
    <div class="k-edit-label"><label for="Person">Person</label></div>
    <div data-container-for="PersonID" class="k-edit-field" id="resourcesDiv0"></div>
    
    <div class="k-edit-label"><label for="Callgroup">Callgroup</label></div>
    <div data-container-for="CallgroupID" class="k-edit-field" id="resourcesDiv1"></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('<div class="k-edit-label"><label for="{0}">{0}</label></div>', resources[resource].title))
                     .appendTo(container);
    
                    container.append('<div data-container-for="" class="k-edit-field"></div>');

                    jQuery(kendo.format('<select style="background-color: white;" 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)
                        });
    
                    container.append("</div>");
                } else {
                    var resourcesContainer = jQuery("\#resourcesDiv" + resource);

                   jQuery(kendo.format('<select style="background-color: white;" data-bind="value: {0}" name="{0}" id="resourceList{0}">', resources[resource].field))
                    .appendTo(resourcesContainer)
                    .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),
                        change: function(e)
                        {
                            // Get the selected callgroup its offsets and show it in the popup:

                            var value = parseInt(this.value());
                            var callgroup = _.findWhere(schedulerVM.chosenCallgroups(), { id: value });

                            appendCallgroupOffsetsToPopup(callgroup);
                        }                     
                     });
    
                }
            }
        
            jQuery("\.k-dropdown").css('background-color', 'white');
    
            // Get the first callgroup and show its offsets in the popup:

            var callgroup = schedulerVM.chosenCallgroups()[0];
            appendCallgroupOffsetsToPopup(callgroup);
    
            function appendCallgroupOffsetsToPopup(callgroup) {
                $("\#callgroupOffsets").remove();

                if(callgroup)
                {
                    var title = "Start offset: " + ("0" + callgroup.defaultTimeFromHours).slice(-2) + ":" + ("0" + callgroup.defaultTimeFromMinutes).slice(-2) + "\\nEnd offset: " + ("0" + callgroup.defaultTimeTillHours).slice(-2) + ":" + ("0" + callgroup.defaultTimeTillMinutes).slice(-2);
                
                    var callgroupDiv = jQuery("\#resourcesDiv1");
                    callgroupDiv.append("<a id='callgroupOffsets' href='\#' title='" + title + "'><i class='fa fa-info-circle' style='margin-left: 5px;'></i></a>");
                }
            }

        })
    <\/script>

</script>

Anyone?
Thanks in advance.

Kind Regards,
Kenny.
Kenny
Top achievements
Rank 1
 answered on 20 Feb 2015
1 answer
1.2K+ views
is it possible to force datepicker to open above input field. As far as i get it datepicker by default opens below input but if it hasnt got the space it opens above if there is space above. Now i would like to force it to open above input by default because that fits my app design perfectly.
Georgi Krustev
Telerik team
 answered on 20 Feb 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?