Telerik Forums
Kendo UI for jQuery Forum
3 answers
245 views
Hi,

var menu = $("#menu").kendoMenu({openOnClick: true }).data("kendoMenu");
menu.close("#Item1");

I am using above method to close the dropdown, it is working fine. But after closing also if i mouse over on the menu the dropdown gets opened.
My requirement is to open the dropdown only on click not on mouse over. could any body help me.

Regards,
Ramesh V.
Dimo
Telerik team
 answered on 23 Dec 2013
10 answers
316 views
I have a phonegap 3 application where I use kendo mobile.

For internationalization I use this:
https://github.com/plang/phonegap-l10n
It's pretty simple. I can add a class an the translation works.

My views:
<div data-role="view" id="tab-catalog" data-title="Catalog" data-layout="mobile-tabstrip">
....
</div>
  
<div data-role="view" id="tab-account" data-title="Account" data-layout="mobile-tabstrip">
 ....
</div>
My Layout:
<div data-role="layout" data-id="mobile-tabstrip">
       <header data-role="header">
           <div id="navbar" data-role="navbar">
               <a data-role="button" data-rel="drawer" href="#drawer" data-icon="drawer-button" data-align="left"></a>
               <span data-role="view-title"></span>
               <a id="scan" data-align="right" data-icon="camera" data-role="button"></a>
           </div>
       </header>
   </div>

Works fine.. but I don't know how to translate the data-title attribute.
I know I can set the title with
$("#navbar").data("kendoMobileNavBar").title("foo");
I also could read the title of my view with kendo.view().title and make the translation, something like this:

$("#navbar").data("kendoMobileNavBar").title(Localization.for(kendo.view().title));

After I start the app is the title is translated, but if I change the view and come back the title is "Catalog" again.

How could I accomplish anything like this?
giord
Top achievements
Rank 1
 answered on 23 Dec 2013
1 answer
347 views
I would like to show each x axis label in two line, e.g.,   I want to show a date label 
2013-12-23 14:59:00
as two lines formatting:
14:59:00 
2013-12-23

if I just show x axis in one line, then the labels are too long and will overlap.
Anyone knows how to do that?
Iliana Dyankova
Telerik team
 answered on 23 Dec 2013
13 answers
99 views
Kendo Mobile version - 2012.3.1315.  I am having issues on native Android devices with click events.  I have a ListView and register to its data-click event.  I then show a ModalView over the ListView.  When I click the Close button of the ModalView, the underlying ListView click event fires as well (ghost click).   I cannot recreate this scenario in the Icenium simulator.  It only occurs on native devices.

Edit:  I've also tested this scenario on 2013.1.703 and the same behavior occurs.

    <div id="modalview-additional-info" style="width: 80%; height: 70%;">
        <div data-role="header">
            <div data-role="navbar">
                <span>Info</span>
                <a data-click="closeModalViewAdditionalInfo" data-role="button" data-align="right">Close</a>
            </div>
        </div>
 
        <div data-role="scroller">
            <p id="additionalInfo"></p>
        </div>
    </div>
 
<ul data-role="listview" data-type="group" data-click="equipmentListViewClick">
...
</ul>
Alexander Valchev
Telerik team
 answered on 23 Dec 2013
1 answer
244 views
How can I create a treeview layout using checkboxes similar to the example below:

[ ] Country A
        [ ] Region A
                [ ] Territory 1
        [X] Region B
                [X] Territory 2
                [X] Territory 7
[ ] Country B
        [ ] Region C
                [ ] Territory 3
                [ ] Territory 4

I am using the MVC helpers and would like to load the data in one call to the controller i.e. NO on-demand loading.

I've been trying to use the following example: http://demos.kendoui.com/web/treeview/remote-data.html - but I 
don't understand how I should construct the JSON object to include children etc.

Similar post here? - http://www.kendoui.com/forums/kendo-ui-framework/hierarchical-data-source/good-way-to-populate-entire-hierarchical-datasource-with-one-data-call.aspx 

Any examples would be great.

Thanks,
Beau
Alex Gyoshev
Telerik team
 answered on 23 Dec 2013
6 answers
1.0K+ views
Hello All:

I wrote fiddle http://jsfiddle.net/RichardAD/QfDd9/ to demonstrate how a portion of a node text value can be highlighted when it matches a search term. Could also be tweaked to hide non-matching nodes.

I'm looking for feedback on the technique and improvements.

Thanks,
Richard
Matt
Top achievements
Rank 1
 answered on 23 Dec 2013
2 answers
94 views
I am trying put dropdownlist under treeview but it is not appearing properly on click and also not able to select due to same reason. I have tried putting contents on JsFiddle with dropdownlist under treeview and without treeview. It is working fine without treeview but having problem if we put under treeview.
Please have a look on http://jsfiddle.net/dN2PK/8/
Vikash
Top achievements
Rank 1
 answered on 21 Dec 2013
1 answer
227 views
Hi, I'm trying to generate a ListView with a sparkline for each item. Each sparkline is associated with a metric that is provided by data source. Each metric has the information about the service that provides its data and the datatype. I'm using the datatype to define the format of the tooltip. However, the tooltip format function is bind only when each value of the series and not in the sparkline definitio. So, it uses the information of the last metric for all the sparklines. How I can use the correct datatype to set the tooltip?

This is my code: 

01.createChart: function (e) {
02.                var list = e.sender;
03.                var data = list.dataSource.data();
04.                for (var i = 0; i < data.length; i++) {
05.                    var item = list.wrapper.find("[data-uid='" + data[i].uid + "']");
06.                    var chart = item.find(".chart");
07.                    var metric = data[i];
08.                    this.metrics[data[i].uid] = metric.MetricType;
09.                    chart.kendoSparkline({
10.                        type: "column",
11.                        dataSource: new kendo.data.DataSource({
12.                            transport: {
13.                                read: {
14.                                    url: metric.MonthService,
15.                                    dataType: "json"
16.                                },
17.                                parameterMap: function (options, operation) {
18.                                    if (operation === "read") {
19.                                        options.hotelId = 2; // _model.get('hotelId');
20.                                        options.year = 2013; //_model.get('date').getYear() + 1900;
21.                                        options.month = 7; //_model.get('date').getMonth() + 1;
22.                                        return options;
23.                                    }
24.                                    return options;
25.                                }
26.                            }
27.                        }),
28.                        series: [{
29.                                    type: 'column',
30.                                    field: metric.MonthValue,
31.                                    color: '#ff0000',
32.                                    negativeColor: '#0099ff',
33.                                    metricType: metric.MetricType // Hack? or Extension
34.                                }],
35.                        tooltip: {
36.                            format: function () {
37.                                switch (metric.MetricType) {
38.                                    case 0: // Graduacion
39.                                        return "{0:N2}";
40.                                        break;
41.                                    case 1: // Cantidad
42.                                        return "{0:N0}";
43.                                        break;
44.                                    case 2: // Moneda
45.                                        return "{0:C2}";
46.                                        break;
47.                                    case 3: // Indice
48.                                        return "{0:N2}";
49.                                        break;
50.                                    case 4: // Porcentaje
51.                                        return "{0:P2}";
52.                                        break;
53.                                    case 5: //Clasificacion
54.                                        return "{0}";
55.                                        break;
56.                                }
57.                            },
58.                            visible: true,
59.                            shared: false
60.                        }
61.                    });
62.                }
In line 14 I set the url of the service based on the metric information. An in line 37 I trying to use the same approach for defining the tooltip but doesn't work. The last metric info is used for all the tooltips.

Thanks in advance.
Alexander Popov
Telerik team
 answered on 21 Dec 2013
1 answer
516 views
I have autohide tooltips, that may have scrollable content.  

But the tooltip hides before the use can move their mouse into the tooltip.  So, I want to delay the close to give the user a chance to scroll if desired.
Right now, the user has to navigate the mouse through the pointer to the target to keep it open.

Thanks
Alexander Popov
Telerik team
 answered on 21 Dec 2013
10 answers
243 views
I have taken the code from this Listview Load More demo:

http://demos.kendoui.com/mobile/listview/press-to-load-more.html#/

and tried running it on an iPhone UIWebView using these files:

<script src="js/jquery.min.js"></script>
<script src="js/kendo.mobile.min.js"></script>
<link href="css/kendo.mobilecommon.min.css" rel="stylesheet" />
<link href="css/kendo.mobile.all.min.css" rel="stylesheet" />

When I use these, the same code from the demo doesn't work with page sizes smaller than 50.  When I change to the kendo.all.min.js like the demo, the Load More works.  I would rather not include the kendo.all.min.js file in the app just for the Load More functionality.  What are the correct minimal includes necessary for the Kendo Mobile Listview Load More to work?

 
Thanks,
Derrick

Atanas Korchev
Telerik team
 answered on 21 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?