Telerik Forums
Kendo UI for jQuery Forum
3 answers
256 views
Hello,
When I try the validation with a wrong input it some times gives me "Created is invalid". But I do expect the message to be "Invalid Format. Use: mm/dd/yyyy" instead. It appears that Kendo validator does it's own validation even if I returns false. What am I missing here?. it works well in Chrome and Firefox but not in IE

Thanks for your answer and looking forward to it.
 
Note: Code is written in Razor under MVC

        $("#Created").kendoValidator({
            rules: {
                dateValidation: function (e) {
                    if (!$(e).val())
                        return true; 
                   var currentDate = kendo.parseDate($(e).val());
                    if (!currentDate) {
                     return false;
                     }
                    return true;
                }
            },
            messages: {
                dateValidation: "Invalid format. Use: mm/dd/yyyy"
            }
        });
Daniel
Telerik team
 answered on 23 Jul 2013
1 answer
165 views
I'm an experienced ASP.NET developer and have worked with the Telerik controls for years.  I’m interested in developing a mobile web application and would like to use the Kendo framework for its cross-device support.  I’m having a hard time getting my head around the architecture for building an app that will access remote data and perform some simple authentication.  The app needs to:

1)       Post to a remote URL and consume the simple XML response for authentication
2)       Retrieve remote data from a SQL database
3)       Potentially interact with a server file system
4)       Serve selected PDF files natively to the device

Can someone give me a high-level idea of how we’d accomplish the following using the client-side library?  My experience tells me to write server-side scripts that output the JavaScript code that Kendo uses, but I’m pretty sure that’s old-school thinking.  Any advice would be helpful, I’m having a tough time getting my head around how to get started.
Alexander Valchev
Telerik team
 answered on 23 Jul 2013
0 answers
85 views
I have a grid with incell editing enabled and keyboard navigation.



Based on business rules we are disabling some cells based on the values on some other columns.



The problem is that when navigation through each cell, when you move
into a cell disable with closeCell method using the edit client event.,
the grid lost focus, and page

scroll up and focus into some of the headers elements.

Thanks in advance,

Gon
gonzalo almada
Top achievements
Rank 1
 asked on 23 Jul 2013
1 answer
158 views
Hi I would like to know if there is way in which I could show some kind of indicator, while doing drag and drop on grid,  to let the user know where the row will e end up once drop it.

Thanks,.
Alexander Valchev
Telerik team
 answered on 23 Jul 2013
1 answer
101 views
I have the following method that sets up a kendo datasource and ties it to a pager and listview. As you'll see in the attached code, the pager itself is pretty bare bones, tie it to the datasource. The datasource sets the page size (10) and turns on serverside paging. Everything works great, until I try to page more than a certain, unknown, number of records. For example, with a page size of 10, I can break the pager by return 101 records. That initially led me to think maybe it was the idea of rendering more than 10 pages. Unfortunately, a page size of 100, and 1000 records also breaks. Any insight to what I am overlooking would be greatly appreciated. Thanks in advance.

var dsOpts = {
    transport: {
        read: {
            url: function() {
                if(displayMode == "items")
                    return "Coverage/GetFolderItemsByPage";
                else if(displayMode == "filter")
                    return "Coverage/GetFilterItemsByPage";
            },
            dataType: "json",
            data: function () {
                if (displayMode == "items") {
                    return {
                        folderId: function () { return $("#treeview").data("kendoTreeView").dataItem("#treeview_tv_active").FolderId },
                        sourceTypeFilter: function () {
                            if ($("#optSourceType").length > 0)
                                return $("#optSourceType").find(".k-state-selected").attr("value");
                            else
                                return "";
                        }
                    };
                } else if (displayMode == "filter") {
                    return getFilterItems();
                }
            }
 
        }
    },
    serverPaging: true,
    schema: {
        data: "MediaItems",
        total: function (response) { return response.Total; },
        model: ItemModel,
        id: "ItemId"
    },
    pageSize: 100,
    requestStart: function (e) {
        kendo.ui.progress($(".image-preview-list"), false);
    },
    requestEnd: function (e) {
        resizeSliders();
        if (displayMode == "items") {
            if (typeof $("#treeview").data("kendoTreeView").dataItem("#treeview_tv_active") != 'undefined')
                $("#hdrFolderName").html("Now Displaying Folder: " + $("#treeview").data("kendoTreeView").dataItem("#treeview_tv_active").Name);
        } else {
            $("#hdrFolderName").html("Now Displaying Filtered Results");
        }
 
 
    }
};
 
MediaItems = new kendo.data.DataSource(dsOpts);
 
$("#divPaging").kendoPager({
    dataSource: MediaItems
});
Alexander Valchev
Telerik team
 answered on 23 Jul 2013
1 answer
651 views
I have changed the color of the Window Title bar to a dark blue:

.k-window-titlebar  {
    background-image: none, linear-gradient(to bottom, rgb(9, 96, 142) 0px, rgb(16, 108, 153) 100%);
}

Is there a way to change the icon of the Close button on a Window to a bright white, or at least change the background of the close button to bright white. The default 'x' is dark so can't be seen when the Windows Title bar is dark too.

Note the Hover style of the close icon is perfect as a non-hover state so I could use that, but I can't figure out what styles that hover is made of.

Ian


Iliana Dyankova
Telerik team
 answered on 23 Jul 2013
1 answer
315 views
I have a chart that displays a tooltip with the value. I need it to also display the date associated with the value.

This is financial data, so I need it to show in the tool tip "34,000 at Mar 31" not just "31,000" as it does now.

Here's my chart:

Html.Kendo().Chart<AccountPerformance>(Model.Results)
    .Name("chartMKT")
    .Title("Market Value")
    .Legend(legend => legend.Visible(false))
    .Series(series =>
            series.Line(model => model.Metrics.MarketValue)
                  .Name(Model.ColumnTitle)
                  .Labels(false)
    )
    .ValueAxis(axis => axis
        .Numeric()
        .Labels(labels => labels.Format("{0:C0}")))
    .CategoryAxis(axis => axis
        .Date()
        .MajorGridLines(builder => builder.Visible(false))
        .Categories(model => model.MarketDate)
        .Labels(labels => labels.Format(mktValFormatter)
        .Rotation(mrkValRotation)))
    .SeriesDefaults(builder => builder.Line().Color("#005984"))
    .Tooltip(tooltip => tooltip
          .Visible(true)
          .Format("{0:C}")
          .Color("white")
          .Background("black")
          .Template("#= value #")
    )
     .Render();
Iliana Dyankova
Telerik team
 answered on 23 Jul 2013
10 answers
175 views
Hi
 I am having an issue when you scroll down a listview with fixed headers then refresh the list the headers get all out of sync.

Example here http://jsfiddle.net/M5FHN/9/

Scroll down then click refresh, then scroll up and the fixed headers are messed up - its like its not counting the offset of the current scroll position when redrawing.


Any ideas how to get over this?

Cheers
Kiril Nikolov
Telerik team
 answered on 23 Jul 2013
1 answer
403 views
Trying to populate a dataviz chart with remote data but no data is plotted and "TypeError: a[0] is undefined" is thrown by kendo.dataviz.min.js.

chart is setup as follows:

function createChart(Description) {
            var chartds = new kendo.data.DataSource({
                transport: {
                    read: {
                        type: "POST",
                        url: "../AJAX/service.asmx/GetMetricTrend",
                        dataType: "json",
                        contentType: "application/json"
                    },
                    parameterMap: function (data, operation) {
                        if (operation != "read") {
                            // web service method parameters need to be send as JSON. The Create, Update and Destroy methods have a "products" parameter.
                            //return JSON.stringify(data);

                        }
                        else {
                            // web services need default values for every parameter
                            data = $.extend({ intMetricID: 17}, data);

                            return JSON.stringify(data);
                        }
                    }
                },
                schema: {
                    data: "d"
                }
            });

            $("#chart").kendoChart({
                dataSource: chartds,
                title: {
                    text: Description + " Weekly Trend"  
                },
                legend: {
                    position: "bottom"
                },
                seriesDefaults: {
                    type: "line"
                },
                series:
                [{
                    field: "Value",
                    name: "Actual Value"
                }],
                categoryAxis: {
                    field: "Week",
                    labels: {
                        rotation: 0
                    }
                },
                valueAxis: {
                    labels: {
                        format: "N0"
                    },
                    majorUnit: 10
                },
                tooltip: {
                    visible: true,
                    format: "N0"
                }
            });
        }


JSON response:

{"d":[{"__type":"clsMetricTrendValues","Week":5,"Value":104.00},{"__type":"clsMetricTrendValues","Week":6,"Value":109.00},{"__type":"clsMetricTrendValues","Week":7,"Value":94.00},{"__type":"clsMetricTrendValues","Week":9,"Value":96.00},{"__type":"clsMetricTrendValues","Week":10,"Value":90.00},{"__type":"clsMetricTrendValues","Week":12,"Value":86.00},{"__type":"clsMetricTrendValues","Week":13,"Value":90.00},{"__type":"clsMetricTrendValues","Week":14,"Value":95.00},{"__type":"clsMetricTrendValues","Week":15,"Value":98.00}]}


following .js files are included:

jquery-1.8.2.min.js
jquery-ui-1.9.2.custom.min.js
kendo.dataviz.min.js
kendo.web.min.js

Thanks
Iliana Dyankova
Telerik team
 answered on 23 Jul 2013
1 answer
93 views
I am creating an app with Kendo UI that you can see in the attached file.

Here everything is MVVM: the whole tabstrips are populated through JS variables loaded through Ajax. All the tabs you don't see the content of are lists of items and charts, where you can add/edit/remove items and it's directly visible without reload. On the "Informations" tab (the one you see) however, there are general information blocks that I want to be able to edit through forms in a popup. 
Although I'd know how to achieve this with regular JS, I'd like to know which way you'd recommend to use with Kendo MVVM - knowing there is an existing observable with all the data.

Thanks!
Daniel
Telerik team
 answered on 23 Jul 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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?