Telerik Forums
Kendo UI for jQuery Forum
1 answer
123 views
In my chart I'm want to render lines and columns bars and want to dynamically set the values of these however no data is rendered even though its been received. I'm using Razor, MVC and my view looks like:

01.@(Html.Kendo().Chart<HourBandChartModel>()
02.    .Name("chartWeeklyHours")
03.    .Title("Weekly Hours vs GCs")
04.    .DataSource(d =>
05.d.Read(r => r.Action("WeeklyHoursVsGuestCheck","ForecastSummaryGraph", new { hutnumber = @ViewBag.HutNumber, week = @ViewBag.Week })))
06.    .Legend(
07.      legend => legend.Position(ChartLegendPosition.Top)
08.    )
09.    .ChartArea(
10.      chart => chart.Width(900).Height(500))
11.    .Series(series =>
12.        {
13.            series
14.                .Column(c => c.TotalHours)
15.                .Stack(true)
16.                .Color("#FFAE00")
17.                .Name("FCST Hours");
18.            series
19.                .Line(c => c.GuestChecks)
20.                .Name("GCs")
21.                .Color("#000000")
22.                .Axis("GCs");
23.        })
24.    .CategoryAxis(axis => axis.Categories(c => c.HourBand)
32.                              .AxisCrossingValue(0, 24)
33.                              .Labels(builder => builder .Rotation(90))
34.    )
35.    .ValueAxis(axis => axis
36.                           .Numeric()
37.                           .Title("hours")
38.                           .Min(0).Max(60)
39.    )
40.    .ValueAxis(axis => axis
41.                           .Numeric("GCs")
42.                           .Title("GCs")
43.                           .Color("#000000")
44.                           .Min(0).Max(120)
45.    ))

As you can see in bold I'm trying to set the Column, Line and Category series with the property values from my model TotalHours, GuestChecks and HourBand respectively. The read call works and Json data is returned in the form below however the chart is empty:
 
1.{"HourBand":["08:30 TO 08:44","08:45 TO 08:59","09:00 TO 09:14","09:15 TO 09:29","09:30 TO 09:44","09:45 TO 09:59","10:00 TO 10:14","10:15 TO 10:29","10:30 TO 10:44","10:45 TO 10:59","11:00 TO 11:14","11:15 TO 11:29","11:30 TO 11:44","11:45 TO 11:59","12:00 TO 12:14","12:15 TO 12:29","12:30 TO 12:44","12:45 TO 12:59","13:00 TO 13:14","13:15 TO 13:29","13:30 TO 13:44","13:45 TO 13:59","14:00 TO 14:14","14:15 TO 14:29","14:30 TO 14:44","14:45 TO 14:59","15:00 TO 15:14","15:15 TO 15:29","15:30 TO 15:44","15:45 TO 15:59","16:00 TO 16:14","16:15 TO 16:29","16:30 TO 16:44","16:45 TO 16:59","17:00 TO 17:14","17:15 TO 17:29","17:30 TO 17:44","17:45 TO 17:59","18:00 TO 18:14","18:15 TO 18:29","18:30 TO 18:44","18:45 TO 18:59","19:00 TO 19:14","19:15 TO 19:29","19:30 TO 19:44","19:45 TO 19:59","20:00 TO 20:14","20:15 TO 20:29","20:30 TO 20:44","20:45 TO 20:59","21:00 TO 21:14","21:15 TO 21:29","21:30 TO 21:44","21:45 TO 21:59","22:00 TO 22:14","22:15 TO 22:29","22:30 TO 22:44","22:45 TO 22:59","23:00 TO 23:14","23:15 TO 23:29","23:30 TO 23:44","23:45 TO 23:59","08:00 TO 08:14","08:15 TO 08:29","00:00 TO 00:14","00:15 TO 00:29","00:30 TO 00:44","00:45 TO 00:59","01:00 TO 01:14","01:15 TO 01:29","01:30 TO 01:44","01:45 TO 01:59","02:00 TO 02:14","02:15 TO 02:29","02:30 TO 02:44","02:45 TO 02:59","03:00 TO 03:14","03:15 TO 03:29","03:30 TO 03:44","03:45 TO 03:59"],"GuestChecks":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.6870950136819702037093341442,5.4323052923971649283961570087,6.2562318952223273304930234815,8.302215778605969758695686634,11.986234206953644671253542133,15.133949330695317203420495954,10.933766737622301835390467521,15.922897377012719269275953013,14.327781343367204133067517661,9.645984320466688510349290632,12.429324848980508265476515872,9.845401284984459973332645456,10.641676202376483817987287683,8.925776082018158342296234009,11.024874872660178686169961838,10.369633291640308255593647797,9.796089572670810793898682470,12.065731902127977027517901032,15.306830620455298549977650831,12.680103474911442768763927566,11.890744376448765792980064392,15.541874733822365043792078810,22.635034805972250926443991782,20.078212524026518428252445470,25.769456639790301763168163418,26.568228435189089645620353290,31.422432578176282726455964472,34.961916031422341072867055287,35.351623416190162610425511464,42.618806500469603977793045234,45.754127724007935398948886367,50.766125123078935124979965920,47.395183195739208008443456131,51.093378012588750673569195519,45.943773042578171380959348957,44.394986572567142869467708363,40.967684125553898103876121554,34.644890908164853051332970573,34.032537220376213973745049750,30.012515326554615658578259615,25.151990821775101801652908783,19.165127263440938757842228920,14.144022089319294761630903445,16.878605044235780505127701259,17.304076264218793737861259611,9.120920924679328592035034514,8.303104190382729195458045860,3.5046744557889760486326145604,2.3986441983253042488035707965,1.3403272558838929688653786770,0.6810727503815188253247944721,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"TotalHours":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.6870950136819702037093341442,5.4323052923971649283961570087,6.2562318952223273304930234815,8.302215778605969758695686634,11.986234206953644671253542133,15.133949330695317203420495954,10.933766737622301835390467521,15.922897377012719269275953013,14.327781343367204133067517661,9.645984320466688510349290632,12.429324848980508265476515872,9.845401284984459973332645456,10.641676202376483817987287683,8.925776082018158342296234009,11.024874872660178686169961838,10.369633291640308255593647797,9.796089572670810793898682470,12.065731902127977027517901032,15.306830620455298549977650831,12.680103474911442768763927566,11.890744376448765792980064392,15.541874733822365043792078810,22.635034805972250926443991782,20.078212524026518428252445470,25.769456639790301763168163418,26.568228435189089645620353290,31.422432578176282726455964472,34.961916031422341072867055287,35.351623416190162610425511464,42.618806500469603977793045234,45.754127724007935398948886367,50.766125123078935124979965920,47.395183195739208008443456131,51.093378012588750673569195519,45.943773042578171380959348957,44.394986572567142869467708363,40.967684125553898103876121554,34.644890908164853051332970573,34.032537220376213973745049750,30.012515326554615658578259615,25.151990821775101801652908783,19.165127263440938757842228920,14.144022089319294761630903445,16.878605044235780505127701259,17.304076264218793737861259611,9.120920924679328592035034514,8.303104190382729195458045860,3.5046744557889760486326145604,2.3986441983253042488035707965,1.3403272558838929688653786770,0.6810727503815188253247944721,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"FixedHours":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]}

The model looks like:
01.public class HourBandChartModel
02.{
03.    public IEnumerable<string> HourBand
04.    {
05.        get; set;
06.    }
07. 
08.    public IEnumerable<decimal> GuestChecks
09.    {
10.        get;
11.        set;
12.    }
13. 
14.    public IEnumerable<decimal> TotalHours
15.    {
16.        get;
17.        set;
18.    }
19. 
20.    public IEnumerable<decimal> FixedHours
21.    {
22.        get;
23.        set;
24.    }
25.}
Please help. Driving me crazy!
Hristo Germanov
Telerik team
 answered on 27 Jun 2014
3 answers
237 views
I am building a Kendo UI application which is working perfectly fine in IE11. But when I add the site to be displayed in compatibility mode in IE11 i am getting an error "'NodeFilter' is undefined'. It raises this error while rendering the layout. see below code.var appRouter = new kendo.Router({
init: function () {
layout.render("#application");
}
});Error is raised in kendo.web.min.js where it tries to remove white spaces (I guess by the name). This is the line of code that is failing.var t=document.createNodeIterator(n,NodeFilter.SHOW_TEXT,function(t){...}

Just learned that NodeFilter is a property for window object. window.NodeFilter is null when compatibility mode is enabled in IE11. But Telerik demo SPA site works fine under these settings.

I have posted this question here also http://stackoverflow.com/questions/24372876/nodefilter-is-undefined-error-when-using-ie-compatibility-mode-with-kendo-ui-spa
Petyo
Telerik team
 answered on 27 Jun 2014
6 answers
283 views
Using kendo ui web.

Picture the following scenario - The 3 simplified tables below are linked via keys:

InspectionTable
-InpsectionId
-RouteScheduleId
-InspectionDetail

RouteScheduleTable
-RouteScheduleId
-RouteId
-ScheduleId

RouteTable
-RouteId
-RouteNumber

ScheduleTable
-ScheduleId
-ScheduleName

In my kendo ui web Grid I want the following data:

|InspectionDetail| |RouteNumber| |ScheduleName|

Handling simple foreign keys I have no problems with. However, no doubt you can see my dilema now as the foreign keys are nested. These are the issues that pops up when I normalize tables too tight :(

Can you smooth the above scenario for me?
I will then apply it to my actual situation.
Vladimir Iliev
Telerik team
 answered on 27 Jun 2014
2 answers
261 views

I need to show Hierarchical data in Listview with filtering enabled; I am not sure how to approach it. Here is sample data:
Level 5
 -Level 5 item1
   - Level 4
      -Level 4 item 1
        -Level 3 
          -Level 3 item1
          - Level 3 item 2
      -Level 4 item 2
 -Level 5 item2

Online demo example shows similar data, but its calling a service to get the data, depending on parent. Online demo

I don’t have a service yet, trying to implement this using local data, but not having any luck. Also, is the service code used by online demo’s available on github? I want to see how service methods are implemented.

Don’t think I need multiple listview controls since structure of each level data is same.

Will appreciate if you can point me to working sample.

Thanks!

Petyo
Telerik team
 answered on 27 Jun 2014
1 answer
376 views
Due to the size restrictions on my page, I would like to only show the validation icon beside each field and have the message within a tooltip of that icon.

In other words, is there a way to go from this (default generated):

<span class="k-widget k-tooltip k-tooltip-validation k-invalid-msg" data-for="Impact" role="alert">
   <
span class="k-icon k-warning"> </span> Impact is required
</
span>


To this:

<span class="k-widget k-tooltip k-tooltip-validation k-invalid-msg" data-for="Impact" role="alert">
   <span class="k-icon k-warning" title="Impact is required"> </span>
</span>
Rosen
Telerik team
 answered on 27 Jun 2014
3 answers
95 views
Hi,
I use the KendoGrid to display some data returned by a MVC3 crontroller.
Data are successfully displayed, but the kendoGrid's pager display "Page 0 of NaN"

Here is my JS: 

        var sectionId = $("#myKendoCombobox").val();
        $("#myKendoDiv").kendoGrid({
            scrollable: true,
            sortable: true,
            pageable: true,
            selecteable: false,
            filterable: true,
            dataSource: {
                    transport: {
                        read: {
                            url: _pathRoot + "GetDataById",
                            data: { sectionId: sectionId },
                            dataType: "json",
                            type: "GET",
                            contentType: "application/json; charset=utf-8"
                        }
                    },
                    schema: {
                        data: "data",
                        total: "total"
                        },
                    pageSize: 1,
            },

            pageable: {
                refresh: true,
                input: true,
                numeric: false
            },       
           columns: [ ... ]
        });


I tried to use un function for the "total" parameter, like this :                         total: function (response) {
                            alert(response.total);
                            return response.total;
                        }
And the message box successfully display my number of items, so it's not a problem of proprty name.

Could you help me to fix that problem ?
Thanks in advance.







Dimo
Telerik team
 answered on 27 Jun 2014
3 answers
1.0K+ views
Using a Grid, what is the event that is fired when something is "grouped".  I want to run a function but only when someone drops a column header into the "group by" area.

Furthermore, is there an event that fires when you remove the grouping.  Meaning you click on the little "x" of the last grouped element.

Thanks,
Jason
Alexander Valchev
Telerik team
 answered on 27 Jun 2014
1 answer
147 views
Hi,

I want to refresh the list of snippet from javascript so that i can change snippet list by changing a option.

i have tried this way but list won't get refresh. any possible way to fix this.

    function PopulateSnippets(data) {
        var editor = $("#Body").data("kendoEditor");
        editor.options.insertHtml.length = 0;
        
        var snippetArray = [];
        $(data).each(function (index, item) {
            snippetArray.push({
                text: item.Text,
                value: item.Value
            });
        });
        editor.options.insertHtml = snippetArray;
    }

Alex Gyoshev
Telerik team
 answered on 27 Jun 2014
1 answer
348 views
Hello,

When uploading files, we have the need to set the withCredentials to false on the XmlHttpRequest. My upload event implementation is as follows:

upload: function (e) {
    var xhr = e.XMLHttpRequest;
    if (xhr) {
        xhr.addEventListener('readystatechange', function (event) {
            if (xhr.readyState == 1) {
                    xhr.withCredentials = false;
                    xhr.setRequestHeader("Authorization", "Bearer " + token);
                    xhr.crossDomain = true;
            }
        });
    }
}

The problem is that the code inside of kendo.all.js for postFormData() overrides the withCredentials value with a "true" after the xhr open event is fired. Thus overriding any setting to the string value of "true", prior to sending.

The code in kendo.all.js is as follows:

xhr.open("POST", url, true);
xhr.withCredentials = "true";
xhr.send(data);

A fix for the issue would be to set the withCredentials value prior to opening the xhr as follows:

xhr.withCredentials = true;
xhr.open("POST", url, true);
 
xhr.send(data);

Please let me know if I am doing something wrong, or if there any plans to change this.
Vladimir Iliev
Telerik team
 answered on 27 Jun 2014
4 answers
219 views
I know this is possible with your typical view, but perhaps this is not supported by modal views?

I am trying to open a modal view with a query param like:
<a data-rel="modalview" href="#myModalView?someParam=123" data-role="button">Open MV </a>
However when I click on the link/button I get this error:
Uncaught Error: Syntax error, unrecognized expression: #myModalView?someParam=123

Is this unsupported on Modal Views?

Mick
Top achievements
Rank 2
 answered on 26 Jun 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
Drag and Drop
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?