Telerik Forums
Kendo UI for jQuery Forum
15 answers
302 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
340 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
336 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
387 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
956 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
315 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
173 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
177 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
81 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
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
Map
Drag and Drop
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?