Telerik Forums
Kendo UI for jQuery Forum
1 answer
79 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
609 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
251 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
143 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
364 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
74 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
1 answer
92 views
When my column chart is rendered with a few data points, they look thin and widely spaced apart. Have a look at the Current_state.png. I want it to look like the desired_state.png 

Here's my existing chart:

Html.Kendo().Chart<AccountPerformance>(Model.Results)
    .Name("chartPCT")
    .Title("% Return")
    .Legend(legend => legend.Visible(false))
    .Series(series =>
            series.Column(model => model.Metrics.Return)
                  .Name(Model.ColumnTitle)
                  .Labels(false)
    )
    .ValueAxis(axis => axis
        .Numeric()
        .Labels(labels => labels.Format("{0}%")))
    .CategoryAxis(axis => axis
                              .Date()
                              .MajorGridLines(builder => builder.Visible(false))
                              .Categories(model => model.Observation)
                              .Labels(labels => labels.Format("MMM")))
     .SeriesDefaults(builder => builder.Column().NegativeColor("#BE2D55").Color("#C0BD7F"))
     .Tooltip(tooltip => tooltip
          .Visible(true)
          .Color("white")
          .Background("black")
          .Format("{0:P2}")
          .Template("#= value #")
    )                             
                                   
    .Render();
Iliana Dyankova
Telerik team
 answered on 23 Jul 2013
4 answers
443 views
I'd like to know if this scenario is possible:
A user expands a row in a master/detail grid, and clicks on a cell with a link that redirects him to another page.
When the user comes back on the grid page, the previously expanded row is expanded.

It would mean saving the expanded row when the user leaves the page (is there a method to retrieve the expanded row?), and expand it again when he comes back (is there a method to expand a row based on for example the ID?)


Marcin
Top achievements
Rank 1
 answered on 23 Jul 2013
6 answers
293 views
Is there any way to get server side data passed into a view into a Kendo MVVM view model? Like with knockoutjs, we use the "ko.mapping" plugin... is there a way to define how to populate a view model with a given JSON object? Or the behaviors, etc?
Alexander Valchev
Telerik team
 answered on 23 Jul 2013
2 answers
119 views
Search is failing me. Is there a known issue with the performance of selecting grid rows in IE8? With 15 columns and 100 rows,selecting a row takes 3 seconds... 


.Selectable(select => select.Type(GridSelectionType.Row).Mode(GridSelectionMode.Multiple))


Works fine in Chrome. We don't have that option though.


Update: Upgrading to jQuery 1.8.2 may have resolved this.
Dimo
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
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?