Telerik Forums
Kendo UI for jQuery Forum
15 answers
298 views
I want to create a datasource that reads a JSON file, and binds one of the fields to a <p>XXX<p/> value in HTML.

I know how to link a variable to a text value using jQuery ... $("#divName").text(variable)

but I don't know how to extract the data from the datasource and use it.

Can someone give me a quick feel for how this would work?

thx. 
Farhan
Top achievements
Rank 1
 answered on 22 Apr 2012
2 answers
329 views
Hi,

Any ideas what I am doing wrong in second #chart2 setup as it does not render correctly (#chart1 does) for me?

works <div id="chart"></div>
doesnt? <div id="chart2"></div>

$(document).ready(function() {
    
    var datatestfield = [ { no: 1, a: 2, b: '3' },
                     { no: 5, a: 3, b: '4' },
                     { no: 40, a: 4, b: '5' }
                   ];
        
    $("#chart").kendoChart({
    title: {
         text: "Kendo Chart Example"
    },
    dataSource: { data: datatestfield},            
    series: [
        { name: "Example Series", field : "a" }
    ]
        });
    
    $("#chart2").kendoChart({
    title: {
         text: "Kendo Chart Example"
    },
    series: [
        { name: "Example Series", field : "a", data: datatestfield }
    ]
        });

});

Thanks
Matt
Matt
Top achievements
Rank 1
 answered on 22 Apr 2012
2 answers
118 views
I am using both Kendo tabstrip(with 3 Tabs) and Kendo Window.
In second Tabstrip I can open a Kendo window
Once the Kendo window is opened and if we switch from one tab to another Kendo window doesn't close.
How can this scenario be resolved???

     waiting for your reply.
     Thanks in Advance
Carlos
Top achievements
Rank 1
 answered on 21 Apr 2012
7 answers
328 views
I want to create a stacked bar chart with no spacing between the bars. It doesn't appear that spacing has any effect on this.

Here is my chart definition:

                      {
                        dataSource:
                          {
                            transport:
                              {
                                read:
                                  {
                                    url: "JSONComfort.aspx?t=" + SessionToken + "&c=" + ClientID + "&s=" + Space,
                                    dataType: "json"
                                  }
                              },
                            sort:
                              {
                                field: "Temperature",
                                dir: "asc"
                              }
                          },
                        title:
                          {
                            text: "Comfort Feedback"
                          },
                        valueAxis:
                          {
                            min: 0,
                            max: 100
                          },
                        chartArea:
                          {
                            background: "#E9E9EB"
                          },
                        seriesDefaults:
                          {
                            spacing: 0,
                            stack: true
                          },
                        series:
                          [
                            {
                              field: "Cold",
                              name: "Cold",
                              color: "blue"
                            },
                            {
                              field: "Cool",
                              name: "Cool",
                              color: "lightblue"
                            },
                            {
                              field: "Comfortable",
                              name: "Comfortable",
                              color: "green"
                            },
                            {
                              field: "Warm",
                              name: "Warm",
                              color: "orange"
                            },
                            {
                              field: "Hot",
                              name: "Hot",
                              color: "red"
                            }
                          ],
                        categoryAxis:
                            {
                              field: "Temperature",
                              labels:
                                {
                                  step: 2
                                }
                            }
                      }

Thanks/Anker
Iliana Dyankova
Telerik team
 answered on 21 Apr 2012
6 answers
381 views
I have a treeview attached to html construction <ul><li>..., this run ok, but I need change to remote datasource for change data dinamically, the problem is when I generated the JSON this not work. I need some example with to resolve this problem... (the kendo treeview example page not show that -  treeview with remote datasource)

Please help me !!!

Thanks in advance
Alex Gyoshev
Telerik team
 answered on 21 Apr 2012
7 answers
924 views
Ok, for the sake of argument, pretend I'm a really thick C++ programmer.

I've made my beautiful UI in HTML5 and KendoUI, but I want to bind a JavaScript function to a checkbox, so when the state of the checkbox changes, my Javascript code is called.  
Currently, I've got this:
<div data-role="view" data-layout="overview-layout" id="tuxedo-home" data-title="Home">   
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            <ul>
                <li>Option 1 <input type="checkbox" data-role="switch" checked></li>
                <li>Option 2 <input id="suspendCard" type="checkbox" data-role="switch"></li>
                <li><a href="overview-cities">Advanced</a></li>
            </ul>
        </li>
    </ul>
</div>

And then this:
    <script>
        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
        function notify() { alert("clicked"); }
        $("#suspendCard").on("click", notify);
    </script>

But nothing happens.
Petyo
Telerik team
 answered on 21 Apr 2012
4 answers
312 views
Hi,

Can someone please tell me if they have used local storage successfully across mobile devices (IOS, Android mainly) using phonegap as the eventual release mechanism?

http://dev.w3.org/html5/webstorage/

And possibly any articles or pointers for me before I dive into it.

Many Thanks
Matt
Noli
Top achievements
Rank 1
 answered on 21 Apr 2012
0 answers
158 views
I want to open a window within an iframe that because it needs its own print.css. 

I don't know why, but I do not think it is actually using the iframe as it always changes the css in the main window. Am I just doing something wrong?

I am trying to use the following code:
function ShowKendoIFrameWindow(element, data) {
    var title = $(element).attr("WindowCaption");
    var url = $(element).attr("WindowURL");
    $("<div />").kendoWindow({
        iframe: true,
        animation: {
            open: {
                effects: { fadeIn: {} },
                duration: 200,
                show: true
            },
            close: {
                effects: { fadeOut: {} },
                duration: 200,
                hide: true
            }
        },
        content: { type: "POST", url: url, data: data },
        title: title,
        draggable: true,
        modal: true,
        resizable: false,
        scrollable: false,
        refresh: function () { this.center(); }
    }).data("kendoWindow").center().open();
    return false;
}
Joshua
Top achievements
Rank 1
 asked on 20 Apr 2012
1 answer
176 views
I have a chart control defined in a .js file:

var chartViewer;
 
function buildChart() {
    chartViewer = $("#chartPane").kendoChart({
        title: {
            text: "Type by Distributor"
        },
        dataSource: searchData,
        autoBind: false,
        seriesDefaults: {
            type: "column"
        },
        series: typeSeries,
        tooltip: {visible: true}
    });
    chartViewer = $("#chartPane").data("kendoChart");
}

In the datasource I do an update of the series each time the grid regroups the values (notes: newData is the change: function, and typeSeries is a global variable:

function newData(e) {
    var items = searchData.view();
    var length = items.length;
    var item;
    $("#recCount").text(searchData.total());
 
    typeSeries = []; 
    for (var i = 0; i < length; i++) {
        item = items[i];
        typeSeries.push({ name: item.value, data: [item.aggregates.type.count] })
    }
//    rebuildChart();
}


But I am not seeing anything in the chart. (blank columns). I tried a chartViewer.refresh() but that just gave a i/o error. I need to set autoBind to false, since I need to poll the server at specific times for the JSON data to populate the datasource.



I know  that my code is pretty close, since this JsFiddle test that I did shows that I can create a series and use it to display a chart. But here the data is all local, and I need a remote JSON source.

http://jsfiddle.net/drysg/gezJd/6/
Gergo
Top achievements
Rank 1
 answered on 20 Apr 2012
0 answers
80 views
hello everyone. I'm trying to style my area chart, but I can't seem to get this right. I'm following the configuration options, but I can't seem to get it right.

I want to style my area chart by making the width of the actual line portion thicker (3px).

I've tried this: 

plotArea: {
    border: {
        width: 3
    }
},

But this doesn't work.

I've done a bunch of permutations of the border, width on different options, and none of it seemed to change the actual line itself.

Am I doing something wrong?
Jeremy
Top achievements
Rank 1
 asked on 20 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?