Telerik Forums
Kendo UI for jQuery Forum
3 answers
178 views
Hello,

I'm not sure where is the right place for this question, so I decided to post it here.

Here is the problem:
I have a mobile web application and use kendo mobile and kendo web.
There is a ListView with input controls in it (form like). Controls are kendo DateTimePicker, kendo NumericTextBox (see screenshots).
The view is using  data-use-native-scrolling="true". I cannot not use application-wide useNativeScrolling: true, because of its side effects.

The problem is, then user puts focus in the input and then scrolls the view, the cursor remain in the same position and it is not scrolled together with the input field it belongs to.

Is there any way to fix this behavior without setting useNativeScrolling: true?
It has some unacceptable behaviors for us.



Petyo
Telerik team
 answered on 06 Nov 2014
1 answer
1.3K+ views
I have a dropdownlist that is loading content from DB.  When it loads, it automatically defaults to the first item in the list.  Is it possible for it to default to a blank value?
Georgi Krustev
Telerik team
 answered on 06 Nov 2014
3 answers
243 views
Strange Situation, and it seems to be a purely display related issue.

I was following the thread here:  http://www.telerik.com/forums/=-24-hour-events-treated-as-all-day

I got the view up and running, however, I have events that start and end on different days, and the same resource can be used multiple times (work force schedule, happens to the overnight people that start on one day and end on another)

For example:  Bob works thursday from 10PM - 6:30 AM
That entry looks fine.  Friday, he comes in at 10PM and works until 6:30 AM.

The second entry has a start time of Friday 10PM and an end time of Saturday 10PM (not 6:30 AM as expected)

This is consistent across all of my third shifters, and only in views that show a schedule as a non contiguous period of time (i.e. day view looks fine, as does month view).


Georgi Krustev
Telerik team
 answered on 06 Nov 2014
1 answer
312 views
hey Guys, I am trying to evaluate the Kendo UI for mobile browser and I just tried kendo-drop-down-list which works fine if I include Kendo.all.min.js but does not work with if I used kendo.mobile.min.js? 

any idea is that control not supported? if not which all control can I use on with kendo.mobile.min.js? or its extra add that I have add to add? a help would be greatly appreciated. this is html code

<h2> Welcome </h2>

<div ng-controller="BaseData as vm">
Hello...
<br>
<select kendo-drop-down-list
k-option-label="'Select a computer'"
k-data-text-field="'name'"
k-data-value-field="'id'"
k-data-source="vm.computers"></select>
</div>

my controller look like below..nothing fancy I am trying to use angular + kendo ui on mobile.

(function () {
'use strict';

angular.module('app')
.controller('BaseData',[welcome]);

function welcome() {
var vm = this;

vm.activate = activate;

activate();

function activate() {
vm.computers=[
{name: "Macbook Pro", id:1},
{name: "Macbook Air", id: 2},
{name: "Mac Pro", id: 3}
]
}
}
})();


thanks
Manish
Petyo
Telerik team
 answered on 06 Nov 2014
20 answers
4.4K+ views
Is there any way to use a Kendo Validator for text fields on a strongly-typed MVC view, but to power it using the attributes from the MVC model?

For example, given the sample "Change Password" model below:
==========================================================
public class ChangePasswordModel
{
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Current password")]
        public string OldPassword { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "New password")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm new password")]
        [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
}
=======================================================

Is there any way to use a Kendo validator to display the appropriate validation messages for the Property attributes like [Required], [DataType], or [StringLength]?

Ultimately, this is more about look than functionality. The built-in client validation in MVC is fine, but I would just like to be able to leverage the styles defined in the Kendo theme, since I am using them elsewhere already.

I believe some or all of this functionality was available for the Telerik MVC Extensions, but I haven't seen anything listed like this for Kendo UI or the Kendo MVC extensions.  Any help would be greatly appreciated.  Apologies if this has already been discussed or answered elsewhere...

Regards,
Steve
Daniel
Telerik team
 answered on 06 Nov 2014
1 answer
127 views
I am using version 2014.2.716 of the Kendo UI Web controls, and the router treats the defined routes as case-sensitive.  So if I have the route "/fooBar" defined, the router will only load that route if I type "/fooBar" in the browser address bar.  If I type "/foobar" (lowercase "b"), then routeMissing event of the router fires.  I would like the routes to not be case sensitive, as I think it will be confusing for end users if they manually type in a URL and it may or may not load correctly depending on the casing.  Is there a way to configure this in the Kendo router?

Thanks,
Sean
Petyo
Telerik team
 answered on 06 Nov 2014
5 answers
1.0K+ views
Can the popup calendar be moved to the right on a datepicker when the input field is 100% wide?

The datepicker is created as this:

@(Html.Kendo().DatePickerFor(m => m).Format("dd-MM-yyyy").ParseFormats(new string[] { "dd-MM-yyyy", "MM/dd/yyyy" }).Culture("da-DK").HtmlAttributes(new { @class = "form-control datepicker", @style="width:100%" } ))

Michael
Top achievements
Rank 1
 answered on 06 Nov 2014
2 answers
174 views
I have a phonegap application including a drawer instance. I'm using the newest Kendoui and was trying the latest internal build.
Every time I open an external view (a href link, without http, local file in phonegap) in the drawer all event handler get applied again to any allready loaded view. This happens only if I open/load a new external view.
If I open an allready open external view the click event handler don't get applied again. This ends in having as much click event handler applied as I open external views from the drawer.

kendoui 2014.2.1020.commercial

The code I'm using looks like:

<!-- drawer -->
<div id="drawer"
     data-role="drawer"
     data-swipe-to-open="true"
     data-before-show="onBeforeShowDrawer">
  <ul data-role="listview">
    <li class="block dark">
      <div class="left">
        <a href="content/candidate/index.html"
           data-role="button"
           data-badge="10"
           data-icon="candidates">
          Candidates
        </a>
      </div>
      <div class="right">
        <a href="content/job/index.html"
           data-role="button"
           data-badge="10"
           data-icon="community">
          Jobs
        </a>
      </div>
    </li>
  </ul>
</div>
 
<!-- layout -->
<div data-role="layout" data-id="default">
  <header data-role="header">
    <div data-role="navbar">
      <a href="#drawer"
         data-role="button"
         data-icon="settings"
         data-rel="drawer"
         data-align="left"></a>
      <a href="content/settings/index.html"
         data-role="button"
         data-icon="settings"
         data-align="right"></a>
    </div>
  </header>
  <footer data-role="footer">
    <div data-role="tabstrip">
      <a href="#drawer"
         data-role="button"
         data-icon="home"
         data-rel="drawer"
         data-align="left"></a>
      <a href="#index"
         data-role="button"
         data-icon="home">Home</a>
    </div>
  </footer>
</div>
 
<div data-role="layout" data-id="plain"></div>
 
<!-- views -->
<div id="index"
     data-role="view"
     data-title="Home"
     data-layout="default"
     data-init="onInitIndex">
  <div id="logo"></div>
</div>
 
    var app = new kendo.mobile.Application($(document.body), {
        root: "",
        initial: page,
        layout: layout,
        skin: "flat",
        // no transition by default with drawer navigation
        // transition: "slide",
        webAppCapable: true
    });
Petyo
Telerik team
 answered on 06 Nov 2014
2 answers
237 views
Hello,

I have an issue when using two or more sortables with same container selector on one page. The problem appears when the width of one sortable differs from another (I use horizontal sortables). The second and others sortables take the sizes (in my case it is width) of the first, but it's wrong. I understand that changing the container's selector (select by id etc.) for each sortable will solve the problem, but in my case/project it's not possible, I had to leave the selector as it is (sortable is used in directive which can be reused several times on one page). 
Is there any way to workaround this issue not changing the selectors? 
Sample page can be found here http://dojo.telerik.com/@Artsem.Valenchyts@specific-group.by/axIKu (just try to drag the second sortable item).

Best Regards,
Artsem
Artsem
Top achievements
Rank 1
 answered on 06 Nov 2014
1 answer
1.2K+ views
I have a Kendo Grid with some "kendoDraggable()" methods on it. This allows me to drag/drop the rows (i.e. reordering rows).

It's based on this : http://jsfiddle.net/BtkCf/4/

The drag/drop of the rows works great, but it then almost completely disables the Edit/Update functions on the grid. That is, the Edit is buggy and won't let me access the cell's text content.

In my attached screen shots, I show the portion of the grid I'm trying to edit. I can click on the EDIT/UPDATE buttons, but CANNOT access the text. There's no error whatsoever.

How can I safely disable the kendoDraggable() events ?

I've tried this, but it doesn't work :

  
$('#userKriGrid tbody tr').off("click", '**');

and neither does this :

mainGrid.table.kendoDestroy()


HTML def:

<span id="userKriGrid" 
kendo-grid="vm.userKriGrid"
k-data-source="vm.kriUserGridDS"
k-options="vm.userKriGridOptions"
k-rebind="vm.userKriGridOptions">
</span>

and here's the function in my angular controller :

function addDragDropKRIGridRow() {
            var mainGrid = $("#userKriGrid").data("kendoGrid");
            var mainDataSource = vm.kriUserGridDS;
            var selectedClass = 'k-state-selected';
 
            $.fn.reverse = [].reverse;  //save a new function from Array.reverse
 
            $(document).on('click', '#userKriGrid tbody tr', function (e) {
                if (e.ctrlKey || e.metaKey) {
                    $(this).toggleClass(selectedClass);
                } else {
                    $(this).addClass(selectedClass).siblings().removeClass(selectedClass);
                }
            });
 
            mainGrid.table.kendoDraggable({
                filter: "tbody tr",
                group: "gridGroup",
                axis: "y",
                hint: function (item) {
                    var helper = $('<div class="k-grid k-widget drag-helper"/>');
                    if (!item.hasClass(selectedClass)) {
                        item.addClass(selectedClass).siblings().removeClass(selectedClass);
                    }
                    var elements = item.parent().children('.' + selectedClass).clone();
                    item.data('multidrag', elements).siblings('.' + selectedClass).remove();
  
                    return helper.append(elements);
                }
            });
            mainGrid.table.kendoDropTarget({
                group: "gridGroup",
                drop: function (e) {
 
                    var draggedRows = e.draggable.hint.find("tr");
                    e.draggable.hint.hide();
                    var dropLocation = $(document.elementFromPoint(e.clientX, e.clientY)),
                        dropGridRecord = mainDataSource.getByUid(dropLocation.parent().attr("data-uid"))
                    if (dropLocation.is("th")) {
                        return;
                    }
 
                    var beginningRangePosition = mainDataSource.indexOf(dropGridRecord),//beginning of the range of dropped row(s)
                        rangeLimit = mainDataSource.indexOf(mainDataSource.getByUid(draggedRows.first().attr("data-uid")));//start of the range of where the rows were dragged from
 
 
                    //if dragging up, get the end of the range instead of the start
                    if (rangeLimit > beginningRangePosition) {
                        draggedRows.reverse();//reverse the records so that as they are being placed, they come out in the correct order
                    }
 
                    //assign new spot in the main grid to each dragged row
                    draggedRows.each(function () {
                        var thisUid = $(this).attr("data-uid"),
                            itemToMove = mainDataSource.getByUid(thisUid);
                        mainDataSource.remove(itemToMove);
                        mainDataSource.insert(beginningRangePosition, itemToMove);
                    });
 
 
                    //set the main grid moved rows to be dirty
                    draggedRows.each(function () {
                        var thisUid = $(this).attr("data-uid");
                        mainDataSource.getByUid(thisUid).set("dirty", true);
                    });
 
                    //remark things as visibly dirty
                    var dirtyItems = $.grep(mainDataSource.view(), function (e) { return e.dirty === true; });
                    for (var a = 0; a < dirtyItems.length; a++) {
                        var thisItem = dirtyItems[a];
                        mainGrid.tbody.find("tr[data-uid='" + thisItem.get("uid") + "']").find("td:eq(0)").addClass("k-dirty-cell");
                        mainGrid.tbody.find("tr[data-uid='" + thisItem.get("uid") + "']").find("td:eq(0)").prepend('<span class="k-dirty"></span>')
                    };
                }
            });
        }


Alexander Valchev
Telerik team
 answered on 06 Nov 2014
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?