Telerik Forums
Kendo UI for jQuery Forum
4 answers
265 views
My understanding is that once a page is rendered in Kendo Mobile, it actually never get destroyed or removed from memory.  This has some impacts on our java script coding that has unintended consequences.

Does Kendo Mobile have a page caching attribute like jQuery Mobile attribute data-dom-cache="true" to clear out cache for individula pages?
Petyo
Telerik team
 answered on 11 Jan 2013
2 answers
120 views
Hi,

I've the following footer declared in my index.html page:
<div id="footer" data-role="footer">
      <div data-role="tabstrip">
           <a href="#tabstrip-home" data-icon="home">Posts</a>
           <a href="Test.html" data-icon="action">Activities</a>
      </div>
<ul id="log">
                 
</ul>
</div>
When I stay on index.html there's no problem to change the content of ul#log, but when I'm on the Test.html page (my 2nd tab), when I try to add something with jquery by doing this:
$('#log').prepend('blablabla');
If I read the content of ul#log with jquery, I can see the new 'blablabla' text, but on the screen it's not displayed!?

Can anyone explain me why?

Thanks,
Bastien
Petyo
Telerik team
 answered on 11 Jan 2013
2 answers
190 views
Hi , is there a possibility for a pie chart to avoid showing on the chart data that have very low value numbers?
 if for a example you want to design a pie chart with a array of 150 items and display the percentage of them in the pie chart;
 if some items have the value lets say 0.01% you don't want to show them on the chart .
Because the slice will be neglictable and also will be too much information around the pie chart that would make it difficult to read.
So the question deep down is if you can set a minimum and a maximum range of values for the pie chart and fetch display data only that belong to that range.
Kyriakos
Top achievements
Rank 1
 answered on 11 Jan 2013
1 answer
151 views
<ul id="panelbar">
    <li class="k-state-active">
        Vendors
        <ul>
                <li class="k-state-selected" ><span onclick="SetVendorID(1)">Vendor 1</span></li>
                <li><span onclick="SetVendorID(1)">Vendor 2</span></li>
       </ul>     
    </li>
</ul>

This selects the first item in the list but only highlights the text not the background of the item like it does when you click on it.

When you click on Vendor 2, Vendor 1 does not deselect the text, it stays white when it should be deselected (black).

Why doesn't this work?
Dimo
Telerik team
 answered on 11 Jan 2013
1 answer
1.9K+ views
Hello, 

I have a template defined as:
<script id="roiTemplate" type="text/x-kendo-template">
        <div id="roi" class="span2 offset1 kpi">
            <p>#=title#</p>
            <input type="text" data-width="100" value="#=value#" class="dial" data-readOnly="true"/>
        </div>
</script>

And here I'm invoking the template and providing it data:
var getTemplate = kendo.template($('#roi').html());
var data = { value : "50", title: "ROI"};
$('#campaign-metrics').append(getTemplate(data));

When I load this page, I get the error "Uncaught TypeError: Cannot call method 'replace' of undefined" kendo.all.js at line 252." What am I doing wrong?

Atanas Korchev
Telerik team
 answered on 11 Jan 2013
4 answers
277 views
go to menus and change the theme to bootstrap. start hovering over the menu items that have dropdowns and the title is whited out. So far i have noticed it on multiple browsers.
Alexander Valchev
Telerik team
 answered on 11 Jan 2013
1 answer
1.4K+ views
Hi,
Is there anyway to hide data points with zero (0) value in a line chart? I'm currently using the line chart and can't seem to find an easy way to do this. Basically a line shows up at the 0 value on the graph and I rather not show the line at all.Provide me any solution how to remove the lines showing zero.Here i'm providing the code below


$.ajax({
                    type: "POST",
                    contentType: "application/json;charset=utf-8",
                    url: "dataVizWebService.asmx/GetSellInOfficeTrends",
                    dataType: "json",
                    success: function (data) {

                        $("#chart").kendoChart({
                            dataSource: {
                                data: data.d,
                                value: "#={0}>0"
                            },
                            legend: {
                                position: "bottom"
                            },
                            title: {
                                text: "Population"
                            },
                            series: [
                                        {
                                            type: "line",
                                            field: "Population2010",
                                            name: "Population2010",
                                            axis: "Year",
                                            color: "#4a7ebb"
                                        }, {
                                            type: "line",
                                            field: "Population2011",
                                            name: "Population2011",
                                            axis: "Year",
                                            color: "#be4b48"
                                        }, {
                                            type: "line",
                                            field: "Population2012",
                                            name: "Population2012",
                                            axis: "Year",
                                            color: "#98b954"
                                        }, {
                                            type: "line",
                                            missingValues: "zero",
                                            field: "Population2013",
                                            name: "Population2013",
                                            axis: "Year",
                                            dashType: "dash",
                                            color: "#000000"
                                        }
                                        ],
                            valueAxis: [{
                                name: "Year",
                                title: { text: "Population in Millions" }
                            }],
                            categoryAxis: {
                                field: "Week",
                                majorTickType: "none",
                                labels: {
                                    skip: 0
                                }
                            },
                            tooltip: {
                                visible: true
                            }
                        })
                    }
                });

Iliana Dyankova
Telerik team
 answered on 11 Jan 2013
1 answer
385 views
I am trying to create a conditional template to display different controls based on the item it is being bound to. In my example, I render a combobox in the second item when in edit mode. The values in the combo appear just fine until I hit save. What I see then is [object Object] where the regular template is trying to display it. How can store and show my selected value in the non-editable template?

FYI.. This is being bound to a JSON string.

[
    {"questiontext":"Please enter the first name.","control":{"type":"textbox","label":"First Name"},"answer":null,"comment":"This is where the comment goes"},
    {"questiontext":"What is the status?","control":{"type":"combobox","label":"Status:","item":[{"itemtext":"Open","itemvalue":"OP"},{"itemtext":"Canceled","itemvalue":"CO"},{"itemtext":"Closed","itemvalue":"CL"},{"itemtext":"Complete","itemvalue":"CO"}]},"answer":null,"comment":null},
    {"questiontext":"What is the status?","control":{"type":"radiobutton","label":"Status:","item":[{"itemtext":"Open","itemvalue":"OP"},{"itemtext":"Canceled","itemvalue":"CO"},{"itemtext":"Closed","itemvalue":"CL"},{"itemtext":"Complete","itemvalue":"CO"}]},"answer":null,"comment":null},
    {"questiontext":"What was the date of the incident?","control":{"type":"datetime","mask":"datetime","label":"Date:"},"answer":null,"comment":null}
]


<!DOCTYPE html>
<html>
<head>
    <title>Editing</title>
    <link href="../../iqaListTest/content/kendo/2012.3.1114/examples-offline.css" rel="stylesheet">
    <link href="../../../iqaListTest/content/kendo/2012.3.1114/kendo.common.min.css" rel="stylesheet">
    <link href="../../../iqaListTest/content/kendo/2012.3.1114/kendo.default.min.css" rel="stylesheet">
 
    <script src="../../../iqaListTest/scripts/kendo/2012.3.1114/jquery.min.js"></script>
    <script src="../../../iqaListTest/scripts/kendo/2012.3.1114/kendo.web.min.js"></script>
    <script src="../../iqaListTest/scripts/kendo/2012.3.1114/console.js"></script>
</head>
<body>
    <a class="offline-button" href="../index.html">Back</a>
    <div id="example" class="k-content">
    <div class="k-toolbar k-grid-toolbar">
        <a class="k-button k-button-icontext k-add-button" href="#"><span class="k-icon k-add"></span>Add new record</a>
    </div>
         
    <div class="listview-holder">
        <div id="listView"></div>
    </div>
 
    <!--<div id="pager" class="k-pager-wrap">
    </div>-->
 
    <script type="text/x-kendo-tmpl" id="template">
        <div class="iqa-view">
            <dl>
                <dt>Question</dt>
                <dd>${questiontext}</dd>
                <dt>${control.label}</dt>               
                <dd>${answer} </dd>
                <dt>Comment</dt>
                <dd>${comment}</dd>
            </dl>
            <div class="edit-buttons">
                <a class="k-button k-button-icontext k-edit-button" href="\\#"><span class="k-icon k-edit"></span>Edit</a>
                <a class="k-button k-button-icontext k-delete-button" href="\\#"><span class="k-icon k-delete"></span>Delete</a>
            </div>
        </div>
    </script>
 
    <script type="text/x-kendo-tmpl" id="editTemplate">
        <div class="iqa-view">
            <dl>
                <dt>Question</dt>
                <dd>${questiontext}</dd>
                <dt>${control.label}</dt>
                <dd>
                    #if (control.type == 'textbox')  { #
                         <input type="text" data-bind="value:answer" name="answer" required="required" validationMessage="required" />
                         <span data-for="answer" class="k-invalid-msg"></span>
                    # } else if (control.type == 'combobox')  { #
                        <select data-role="combobox" data-text-field="itemtext" data-value-field="itemvalue" data-bind="source:control.item, value:answer"></select
                    # } #         
                </dd>
                <dt>Comment</dt>
                <dd>${comment}</dd>
            </dl>
            <div class="edit-buttons">
                <a class="k-button k-button-icontext k-update-button" href="\\#"><span class="k-icon k-update"></span>Save</a>
                <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span>Cancel</a>
            </div>
        </div>
    </script>
 
    <script>
        $(document).ready(function () {
            var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "iqaData.txt",
                        dataType: "json"
                    }
                }
            });           
 
            var listView = $("#listView").kendoListView({
                dataSource: dataSource,
                template: kendo.template($("#template").html()),
                selectable: "single",
                editTemplate: kendo.template($("#editTemplate").html())
            }).data("kendoListView");
 
            $(".k-add-button").click(function (e) {
                listView.add();
                e.preventDefault();
            });
        });
    </script>
    <style scoped>
        .iqa-view
        {
            float: left;
            width: 650px;
            margin: 5px;
            padding: 3px;
            -moz-box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
            -webkit-box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
            box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
            border-top: 1px solid rgba(0,0,0,0.1);
            -webkit-border-radius: 8px;
            -moz-border-radius: 8px;
            border-radius: 8px;
        }
 
        .listview-holder
        {
            width: 700px;
            margin: 0 auto;
            padding: 0;
            border: 0;
            border: 1px solid rgba(0,0,0,0.1);
            height: 400px;
            overflow: auto;
        }
 
        .iqa-view dl
        {
            margin: 10px 0;
            padding: 0;
            min-width: 0;
        }
        .iqa-view dt, dd
        {
            float: left;
            margin: 0;
            padding: 0;
            height: 30px;
            line-height: 30px;
        }
        .iqa-view dt
        {
            clear: left;
            padding: 0 5px 0 15px;
            text-align: right;
            opacity: 0.6;
            width: 100px;
        }
        .k-listview
        {
            border: 0;
            padding: 0;
            min-width: 0;
        }
        .k-listview:after, .iqa-view dl:after
        {
            content: ".";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }
        .edit-buttons
        {
            text-align: right;
            padding: 5px;
            min-width: 100px;
            border-top: 1px solid rgba(0,0,0,0.1);
            -webkit-border-radius: 8px;
            -moz-border-radius: 8px;
            border-radius: 8px;
        }
 
        .k-toolbar, #listView
        {
            width: 660px;
            margin: 0 auto;
            -webkit-border-radius: 11px;
            -moz-border-radius: 11px;
            border-radius: 11px;
        }
         
        span.k-invalid-msg
        {
            position: absolute;
            margin-left: 160px;
            margin-top: -26px;
        }
    </style>
</div>
</body>
</html>
Alexander Valchev
Telerik team
 answered on 10 Jan 2013
1 answer
270 views
Team,

I have a html grid which has input value that consists of datetimepicker.

I have grid with 3 rows ans when I tried to tag kendo datepicker to the column, it is visible only for the first row.

Am I missing some thing..
Iliana Dyankova
Telerik team
 answered on 10 Jan 2013
2 answers
600 views
After implementing the following javascript to align the Update and Cancel popup editors buttons to the right they now display in the incorrect order, i.e. Cancel then Update.

function onGridEdit(e){
      e.container.find('.k-grid-update,.k-grid-cancel').css('float','right');
}

How do I get the buttons on the right and remain in the Update, Cancel display order?
Robert
Top achievements
Rank 1
 answered on 10 Jan 2013
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
Drag and Drop
Application
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
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?