Telerik Forums
Kendo UI for jQuery Forum
6 answers
356 views
How do I configure the widget to bind to this XML?

http://www.google.com/ig/api?weather=hamilton,ON


This is my definition so far...

$(document).ready(function () {
    function onChange() {
        $("#weather-container").html(kendo.render(template, this.view()));
    }
 
    // create a template using the above definition
    var template = kendo.template($("#dashwidget-weather-template").html());
 
    var dataSource = new kendo.data.DataSource({
        transport: {
            // specify the XML file to read. The same as read: { url: "books.xml" }
            read: {
                url: "http://www.google.com/ig/api?weather=hamilton",
                dateType: "xml"
            }
        },
        schema: {
            // specify the the schema is XML
            type: "xml",
            // the XML element which represents a single data record
            data: "/weather/current_conditions",
            // define the model - the object which will represent a single data record
            model: {
                fields: {
                    condition: "condition/text()",
                    temp: "temp_c/text()"
                }
            }
        },
        change: onChange
    });
 
    dataSource.read();
});
Tom
Top achievements
Rank 1
 answered on 28 Apr 2012
0 answers
194 views
I am trying to establish the basics with the splitter.

I have have three panes and am trying to load a page into the middle pane and then resize the spliiter tp fit the content.

When I call

var splitter = $("#splitter").data("kendoSplitter");
 // expand the pane with ID, pane1
splitter.expand("#mainContent");

I get a "splitter is undefined" error. 

Here is the code...


<div align="center">
        <div id="splitter" style="border-color:whitemargin:1pxwidth:80%" align="center">
            <div id="menu">Area 1</div>
            <div id="mainContent">Area 2</div>
            <div id="rightCol">Area 3</div>
        </div>
    </div>
<a href="#" onclick="test()">Expand</a>


 $("#splitter").kendoSplitter({
                panes: [
                    { size: "100px", collapsible: false, min: "100px", max: "110px", resizable: false },
                    { size: "700px", min: "300px",  contentUrl: "../default.aspx"},
                    { size: "100px", collapsible: false, min: "100px", max: "110px", resizable: false }
                ],
                orientation: "horizontal"
            })


function test() {
            var splitter = $("#splitter").data("kendoSplitter");
            // expand the pane with ID, pane1
            splitter.expand("#mainContent");
        }

I am seeing a few other posts about resizing to fit contents, can it be done this way or do you need to resize from the loaded page to the parent?

Cheers
Tony
Top achievements
Rank 1
 asked on 28 Apr 2012
2 answers
1.3K+ views
How can I convert a datasource which is an array of "object" 3 columns per row in kendoui grid to a json object I can send into an mvc controller?

Thank you,
Jerry
Top achievements
Rank 1
 answered on 28 Apr 2012
0 answers
86 views
Hi, I'm new to KendoUI and JS based UI framework.
I wonder if I can decompose complex UI page/form into "UserControls"(like asp.net) and then
A. use "Contianer" ,
B. or even something like "Region Import"(in Prism) technology,
to compose them.
I go through the TabStrip and Window KendoUI controls and find them can act as a "Container" and load content from other seperated files,
so I think option A above is achievable, but how should I do?
Further, when using Prism, sivlerlight applications can make views as plugins and auto imported into ShellView by IoC container,
is there a same technology in KendoUI or jQuery, or something else.

Please show me a way out, thanks in advance.:-)
Herbert
Top achievements
Rank 1
 asked on 28 Apr 2012
0 answers
86 views
We are looking for some Kendo UI designers/developers, but it seems that Kendo is still a bit new in the general development community.    Any suggestions?   Or does anyone know of someone who would be interested?  

If you don't want to post here, you can send me a note at 'info' at-sign 'carpedatuminc.com'.

Steven
Top achievements
Rank 1
 asked on 28 Apr 2012
0 answers
66 views
How to add the date by 2 days from the current date by default when the page is displayed using datepicker

$(

 

"#toDate").kendoDatePicker({

 

value:

 

new Date(),

 

min:

 

new Date(1950, 0 ,1),

 

max:

 

new Date(2049,11,31)

 

})

Here by default it is giving current date for example 4/27/2010, but I wanted it to diplsay by + 2 days i.e 4/29/2012.
How can I achieve this?


Brahmaiah
Top achievements
Rank 1
 asked on 27 Apr 2012
4 answers
487 views
Hi,

Do you have a code sample that demonstrates how to bind a grid to a remote webservice (normal SOAP webservice)

http://demos.kendoui.com/web/grid/remote-data.html 

Thanks!
Richard
Top achievements
Rank 1
 answered on 27 Apr 2012
0 answers
68 views
Hello,

I am currently attempting to implement a kendo grid with server grouping and server paging enabled.  The pageSize is set to 10.  And without grouping turned on when I pass the grid data, it returns 10 rows of data as expected per page.  However, when I enable server grouping, and I pass the necessary data to the grid, it returns 10 groups and ALL the data within each row which is way more than 10 data rows.  Is it possible to have the kendo grid only return 10 data rows when grouping is enabled and NOT 10 groups of data?

Thanks,
Susan
Susan
Top achievements
Rank 1
 asked on 27 Apr 2012
0 answers
124 views

Using KendoUI Line graph, I have multiple series of data and I'd like to show in the tooltip additional data pertaining to a single series of data in the tool tip. In this case I want to show the survey count in the tooltip for each product. I also have a market segment that represents the average of all products in the database in which I don't want to show the data. So for Market Segment I don't want to show the Survey Count.

How do I go about doing this?

This link is to my failed jsFiddle Project: http://jsfiddle.net/rodneyhickman/uMTnh/9/

In the jsFiddle project above I get the survey count for the first product they way I want it for product 2, product 3, etc. For the Averages (Market Segment) I don't want to show a survey count. 

My markup:

<div  >
   
<div id='chart'  ></div>
</div>

​ My JavaScript:

jQuery(function() {

var myData = [
   
{
       
"product1": 86.61,
       
"product2": 85.23,
       
"marketsegment": 80.17,
       
"date": "Mar 2011",
       
"surveyCountProduct1": "2",
       
"surveyCountProduct2": "4"
   
},
   
{
       
"product1": 87.61,
       
"product2": 84.23,
       
"marketsegment": 81.12,
       
"date": "Mar 2011",
       
"surveyCountProduct1": "2",
       
"surveyCountProduct2": "3"
   
},
   
{
       
"product1": 87.91,
       
"product2": 85.53,
       
"marketsegment": 81.57,
       
"date": "Mar 2011",
       
"surveyCountProduct1": "2",
       
"surveyCountProduct2": "4"
   
},
   
{
       
"product1": 88.22,
       
"product2": 85.23,
       
"marketsegment": 81.90,
       
"date": "Mar 2011",
       
"surveyCountProduct1": "2",
       
"surveyCountProduct2": "4"
   
},
   
{
       
"product1": 88.61,
       
"product2": 86.13,
       
"marketsegment": 79.17,
       
"date": "Mar 2011",
       
"surveyCountProduct1": "2",
       
"surveyCountProduct2": "5"
   
}
];

jQuery
('#chart').kendoChart({
    title
: {
        text
: "Overall Score out of 100",
        align
: "left",
        font
: "18px Arial, Verdana, sans-serif",
        color
: "#444"
   
},
    seriesDefaults
: {
        type
: "line",
        missingValues
: "interpolate"
   
},
    legend
: {
        position
: "bottom"
   
},
    tooltip
: {
        visible
: true,
       
template: "<b>#= series.name #</b><br/>#= dataItem.date #<br/>#= value #<br/>Survey Count= #= dataItem.surveyCountProduct1 #"
   
},
    valueAxis
: {
        min
: 75,
        max
: 95,
        plotBands
: [{
           
from: 75,
            to
: 80,
            color
: "#f5f5f5"
       
},
       
{
           
from: 85,
            to
: 90,
            color
: "#f5f5f5"
       
},
       
{
           
from: 95,
            to
: 100,
            color
: "#f5f5f5"
       
}]
   
},
    dataSource
: {
        data
: myData
   
},
    series
: [
       
{
            name
: "Some Product 1",
            color
: "#004990",
            width
: 1,
            field
: "product1",
            markers
: {
                background
: "#004990"
           
}
       
},
       
{
            name
: "Some Product 2",
            color
: "#8a7967",
            width
: 1,
            field
: "product2",
            markers
: {
                background
: "#8a7967"
           
}
       
},
       
{
            name
: " Market Segment Average",
            color
: "#da7633",
            width
: 1,
            field
: "marketsegment",
            markers
: {
                background
: "#da7633"
           
}
         
}],
         categoryAxis
: {
         labels
: {
            rotation
: -45,
            step
: 1,
            skip
: 0
       
},
        categories
: ["Mar", "Apr", "May", "Jun", "Jul"]
       
}
   
});
});​

Any help would be appreciated.

Rodney
Top achievements
Rank 2
 asked on 27 Apr 2012
2 answers
90 views
Consider a tree built by drag and drop.  Dropped nodes are added to the tree.  Then the user uses tree drag and drop to rearrange and/or change level of the tree nodes.

How would I obtain the 'data' the that the treeview is currently presenting ?

Thanks,
Richard
King Wilder
Top achievements
Rank 2
 answered on 27 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?