Telerik Forums
Kendo UI for jQuery Forum
1 answer
307 views
Greetings,

In my application I have several optional date fields.   

This is Great:  1/1/2001  (or any other valid date)
This is fine too since it's not required: ""   (nothing)
This is not ok and is Invalid:  "asdfasdfasdf"

When data binding (I use knockout with kendoUI), and when listening to the change event, there seems to be no difference between empty text, and an invalid date that has been entered.   How can I differenciate between the two?

I would like to display validation errors in the case of invalid data, or even just clear the date out when focus is lost would work as well.  

I found a similar post which directed another individual here: http://jsbin.com/ufimom/640/edit   However that is using jquery validation which I'm not interested in bringing that in to solve this issue.

Is there something obvious I'm missing here?    If it's relevant, I am using knockout and knockout-kendo libraries.

Thanks!
Shaun



Alexander Popov
Telerik team
 answered on 16 Oct 2013
4 answers
144 views
This is the code and i cant figure out why the tree does not expand and the clicking on node makes the arrow to go way and nothing happens. Any ideas?

Thank you a lot

    var dataSource = new kendo.data.HierarchicalDataSource({
        data: [
    {
        Id: "504644ed-f044-441a-b5a2-0932535cae1d",
        CategoryName: "Category 1",
        RootCategoryLvl: [
            {
                Id: "254efcac-e213-423a-b665-a4bad0df1bce",
                CategoryName: "Category 1-2",
                ChildrenCategory1: []
            },
            {
                Id: "0a4e218f-dfef-44d2-a68e-f2ec7db65298",
                CategoryName: "Category 1-1",
                ChildrenCategory1: [
                    {
                        Id: "8fa23676-79ec-4b09-aba5-a25400dc3fc9",
                        CategoryName: "Category 1-1-1",
                        ChildrenCategory2: [
                            {
                                Id: "238e006d-a7d2-4a9f-9e49-a25400dc7d87",
                                CategoryName: "Category 1-1-1-1",
                                ChildrenCategory3: null
                            },
                            {
                                Id: "f443ad31-e1a0-4627-926b-a25400dc8784",
                                CategoryName: "Category 1-1-1-2",
                                ChildrenCategory3: null
                            },
                            {
                                Id: "07a2b4a9-2d1d-4e83-a688-a25400dc8fa5",
                                CategoryName: "Category 1-1-1-3",
                                ChildrenCategory3: null
                            }
                        ]
                    },
                    {
                        Id: "8ce00d5a-8f46-4ea8-b0ae-a25400dc53af",
                        CategoryName: "Category 1-1-2",
                        ChildrenCategory2: []
                    }
                ]
            }
        ]
    },
    {
        Id: "e0de81c2-b05f-43cc-b9ca-8d2e2a26a2b9",
        CategoryName: "Category 2",
        RootCategoryLvl: [
            {
                Id: "df2e275d-25f2-4675-9263-13c1a8c573a5",
                CategoryName: "Best Selling Products",
                ChildrenCategory1: []
            },
            {
                Id: "18f82b35-01a9-4350-b24d-94a56a063351",
                CategoryName: "Current Inventory List",
                ChildrenCategory1: []
            }
        ]
    },
    {
        Id: "09a0101f-1fc9-4827-b870-a23400a2bd1e",
        CategoryName: "test1",
        RootCategoryLvl: []
    },
    {
        Id: "5bd75a56-994f-457f-8e65-a23400a35040",
        CategoryName: "test2",
        RootCategoryLvl: []
    }
        ],
         schema: {
            model: {
                id: "Id",
                hasChildren: "ChildrenCategory1",
                children: {
                    schema: {
                        model: {
                            id: "Id",
                            hasChildren: "ChildrenCategory2",
                            children: {
                                schema: {
                                    model: {
                                        id: "Id",
                                        hasChildren: "ChildrenCategory3",
                                        children: {
                                            schema: {
                                                model: {
                                                    id: "Id",
                                                    hasChildren: false
                                                    
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }                     
                    }
                }
            }
        }
    });

   $("#treeview-right").kendoTreeView({
       dataSource: dataSource,
       dataTextField: ["CategoryName"]
   });
Svetlin
Top achievements
Rank 1
 answered on 15 Oct 2013
1 answer
866 views
I have a grid that's pulling data from an array, and it just won't sort when it loads up. I can sort it by clicking the column header, but I need it initially sorted. No matter what I try, it always comes up unsorted. The first few entries in the Count column are 100, 222, 11, 441, 168, 15, 493, 11, 32, 24...
$('#TopCalcsGrid').kendoGrid({
    dataSource: {
        data: topcalcs,
        schema: {
            model: {
                fields: {
                    Name: { type: "string" },
                    Count: { type: "number" }
                }
            }
        }
    },
    sortable: {
        allowUnsort: true
    },
    reorderable: true,
    resizable: true,
    columns: [{
        field: "Name",
        title: "Calculator"
    }, {
        field: "Count",
        title: "Count"
    }],
    sort: { field: "Count", dir: "desc" }
});
Deej
Top achievements
Rank 1
 answered on 15 Oct 2013
1 answer
90 views
Can anyone elaborate on what was added to the 1015 build regarding the statusBarStyle configuration?

Thanks
Jason
Top achievements
Rank 1
 answered on 15 Oct 2013
5 answers
104 views
I have a basic test app running. It contains a landing page with an image on it and a button below the image. If you click the image, an alert pops up. If you click the button, a modal view pops up. The trouble is, when you click "close" on the modal, it triggers the alert event for the image (as long as you touch the part of the button that overlays the image in the background). This appears to be true for any kind of popover layer view.

I am testing on an android 4x device through ICENIUM. It runs fine in the simulator.

Anything to do about this?

Thanks
Michael
Top achievements
Rank 1
 answered on 15 Oct 2013
4 answers
169 views
I'm having an infinate loop issue in IE8, but only when I have an All-Day Event.  It doesn't happen with IE9, but unfortunately IE8 is our standard, so I need for it to work with IE8.  I was getting the following error on a PC with IE8, so I put a break point there using IE9 in IE8 mode (which acts a little differently) and without an All-Day event it loaded fine, but with an All-Day event it endlessly hits a breakpoint at this line:

Message: Invalid argument.
Line: 52661
Char: 21
Code: 0
URI: http://website/src/js/kendo.web.js

I have a lot of customization, so I tried to remove most of it in an effort to rule out my code being the issue.  I noticed it because in IE8 when I hovered over an event, I didn't see the delete 'x' and expansion bars.  There were no errors on IE9 in IE8 mode and it seems to be because the page is stuck in a loop and never finishes loading.
$("#calendar").kendoScheduler({
    views: [
            "day",
            { type: "week", selected: true },
            "month",
            "agenda"
        ],
    dataSource: {
        serverFiltering: true,
        timezone: "US/Eastern",
        transport: {
            read: {
                url: webServiceBaseUrl + "readEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            update: {
                url: webServiceBaseUrl + "updateEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            create: {
                url: webServiceBaseUrl + "createEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            destroy: {
                url: webServiceBaseUrl + "destroyEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            parameterMap: function (data, operation) {
                if (operation == "create" || operation == "update") {
                    if (data.contactID == null || data.contactID == 0) {
                        data.contactID = 4;
                    }
                    if (data.categoryID == null || data.categoryID == 0) {
                        data.categoryID = 8;
                    }
                    var editor = $("#editor").data("kendoEditor");
                    if (editor != null) {
                        data.eventContent = editor.value();
                    }
                    data.lastEditDate = "";
                    if (operation == "create") {
                        data.ownerID = $('#userName').val();
                    }
                    if (operation == "update") {
                        data.lastEditorID = $('#userName').val();
                    }
                    return JSON.stringify({ eventItem: data });
                } else if (operation == "read") {
                    var calender = $("#calendar").data("kendoScheduler");
                    return JSON.stringify({ selectedDate: $("#calendar").data("kendoScheduler").date() });
                } else if (operation == "destroy") {
                    return JSON.stringify({ id: data.id });
                }
            }
        },
        schema: {
            data: "d",
            model: {
                id: "id",
                fields: {
                    id: { from: "id", type: "number" },
                    description: { from: "eventContent", type: "string" },
                    end: { from: "eventEnd", type: "date" },
                    endTimezone: { from: "endTimezone", type: "string" },
                    isAllDay: { from: "isAllDay", type: "boolean" },
                    recurrenceException: { from: "recurrenceException", type: "string" },
                    recurrenceID: { from: "recurrenceID", type: "number" },
                    recurrenceRule: { from: "recurrenceRule", type: "string" },
                    start: { from: "eventStart", type: "date" },
                    startTimezone: { from: "startTimezone", type: "string" },
                    title: { from: "title", type: "string", defaultValue: "No title", validation: { required: true} },
                    ownerID: { from: "ownerID", type: "string" },
                    categoryID: { from: "categoryID", type: "number", nullable: true },
                    outageNumber: { from: "outageNumber", type: "string" },
                    contactID: { from: "contactID", type: "number" },
                    locations: { from: "locations", type: "string" },
                    lastEditorID: { from: "lastEditorID", type: "string" },
                    scopeOfWork: { from: "scopeOfWork", type: "string" },
                    wbpLink: { from: "wbpLink", type: "string" }
                }
            }
        }
    }
});
This is the json response for a test All-Day record:
{"__type":"Event","id":61,"wbpLink":null,"eventEnd":"\/Date(1381204800000)\/","endTimezone":"","isAllDay":true,"recurrenceException":"","recurrenceID":0,"recurrenceRule":"","eventStart":"\/Date(1381204800000)\/","startTimezone":"","title":"test","ownerID":"owner","categoryID":1,"eventContent":"test","outageNumber":"test","contactID":4,"locations":"test","scopeOfWork":"test","lastEditorID":"","lastEditDate":"\/Date(1381377600000)\/"}
The demo with an All-day event seems to work fine, though it is returning jsonp as opposed to json.  I downloaded the latest internal build with no luck.  I'm not sure what could be causing this.  My html is basically just a div.  It is on an aspx page with a master page.  Any suggestions to help me troubleshoot this would be appreciated.
Cyndie
Top achievements
Rank 1
 answered on 15 Oct 2013
2 answers
292 views
Hello!

I am trying to pre filter my Kendo Grid, but have not found a way to do so.
 The filtering works just fine; I just need a way to initialize the filter on setup.

Code Snippet:
.Columns(columns =>
                          {
                              columns.Bound(p => p.myColumn)
                                               .Filterable(f => f.Extra(false))
                                               .Title("MyColumn");           
                           })
.Filterable(x => x.Enabled(true)
                               .Operators(o => o.ForEnums(e => e.Clear()
                                                                                                  .IsEqualTo("Is equal to")
                                                                                                  .IsNotEqualTo("Not equal to")))
)
Ermish
Top achievements
Rank 1
 answered on 15 Oct 2013
3 answers
366 views
Hi,
Here is what i want to achieve : 
I have a grid wich contains a list of customers (for instance). I have a template specificied using  ClientDetailTemplateId which contains a TabStrip. One of the tabs contains another grid which display orders. Preety much the same as the example in the demos : http://demos.kendoui.com/web/grid/detailtemplate.html
I need to show/hide columns of that order grid according to to the type of customer, how can I achieve that ?
Dimiter Madjarov
Telerik team
 answered on 15 Oct 2013
6 answers
203 views
When making the scheduler selectable the Kendo framework makes a call to focus the control.  This causes different behavior amongst browsers:

Chrome/IE cause the browser window to scroll so that the scheduler is in view while FireFox does not.  The call to focus is causing us some issues - is the focus call important in this case?  If we were to remove the call would this cause us issues?

Note: This can be exhibited in the following demo http://demos.kendoui.com/web/scheduler/selection.html
Nikolay Rusev
Telerik team
 answered on 15 Oct 2013
9 answers
754 views
Hi,

Can you tell me when Kendo UI will provide support for Web Sockets as a Kendo Data Source? 

I need to remove as must delay as possible in accessing my AutoComplete selection lists.  This is a critical capability for my software product.

Thanks,

Donald
David
Top achievements
Rank 1
 answered on 15 Oct 2013
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?