Telerik Forums
Kendo UI for jQuery Forum
2 answers
131 views
So i have an application that starts up using the default platform.  I have added a button on the home screen that allows you to pick which platform you would like the UI to mimic.  My problem is actually getting the UI to change, or having it partially change.

I have some javascript code like:

var crmMobile = (function () {
    var mobileApp = null;

    return  {
                init: function (cfg) {
            mobileApp = new kendo.mobile.Application(document.body, {
                skin: settings.skin //this sets it to default
            });
        },
            changeSkin: function (skin) {  //I have tried used both of the below methods
                      mobileApp.skin = skin;
                      mobileApp.platform = skin;
            }
    }
})



Neither of those calls seems to change the the look.  any help would be much appreciated! Thanks.
Kiril Nikolov
Telerik team
 answered on 21 Dec 2013
2 answers
107 views
Hello.

Is there any way to catch format exception from Time picker? It seems that whenever I manually enter time with wrong format into Time picker it won't fire onChange event and I can not validate proper format.

Thank you.
Michael
Top achievements
Rank 1
 answered on 20 Dec 2013
2 answers
295 views
I need to invoke a js method after an Update Action with an inline editable grid. I hooked into the Save event as so: 

          .Events(e => e.Save("save_grid"))

However, that happens before the Update Action.  I need "save_grid" to occur AFTER the update action. 

Any ideas? 

GCS
Top achievements
Rank 1
 answered on 20 Dec 2013
1 answer
92 views
In the documentation for seriesDefaults.stack the following info is shown...

"The stack option is supported when series.type is set to 'bar' or 'column'."

However, I can set seriesDefaults.stack = true on a line or area chart and it seems to work. You also have an example that includes this capability.

Is this a new feature?

Is the documentation out of date?

Is this something we should or should not be doing?
Hristo Germanov
Telerik team
 answered on 20 Dec 2013
2 answers
224 views
hello there!
i have 3 views "menu", "details" and "cart" which have a header and a footer. The tabstrip only has 2 tabs : "menu" and "cart". 

<div data-role="view" id="menu" data-title="Menu"  data-layout="myLayout" data-model="viewModel">
   here i have a listview with the category names and when i click on an "li" it goes to the #details view where products are filtered by the category name
</div>

<div  id="details" data-role="view" data-title="Details" data-layout="myLayout" data-transition="slide:left" data-model="viewModel" >
    <h3 class="item-title">#: name #</h3>
    <p class="item-info">#: description #</p>
    <a data-role="button" data-item-id="#:id#" class="details-link fa"  data-icon="cart" data-bind="click: addToCart" >#: price # lei</a>
</div>

the footer from myLayout looks like this:

<footer data-role="footer">
<div data-role="tabstrip" id="badgeIcon">
    <a href="#menu" class="fa" data-icon="home">Menu</a>
    <a href="#cart" class="fa" data-icon="cart" >Cart</a>
</div>
</footer>

i have onInit function which works and initializes the badge:

function onInit(e) {
 var tabstrip = e.layout.footer.find(".km-tabstrip").data("kendoMobileTabStrip");
 tabstrip.badge(1,0);
}

And the addToCart function is this
function addToCart(e) {
var tabstrip = $("#badgeIcon").data("kendoMobileTabStrip");
tabstrip.badge(1, +tabstrip.badge(1) + 1);

....rest of function which works perfectly...
}

The app loads in the #menu view from where it goes to #details view,  and then,  when i click on a #li it crashes and gives me an error on the " tabstrip.badge(1, +tabstrip.badge(1) + 1); " line

Uncaught TypeError: Cannot call method 'badge' of undefined 

If i load the app in the #details view ( index.html#details ) with all the items shown, it works and updates the cart badge, but i want to filter them and thats why i have the #menu view first.

I'm using the latest kendo latest release with jQuery1.9.1

Please give me your input and thanks in advance :)








Radu
Top achievements
Rank 1
 answered on 20 Dec 2013
1 answer
87 views
The online demo for listiew editing (here)  lists the following code:


function listViewInit(e) {
    e.view.element.find("#list-edit-listview").kendoMobileListView({
        dataSource: dataSource,
        template: $("#itemTemplate").html()
    })
    .kendoTouch({
        filter: ">li",
        enableSwipe: true,
        touchstart: touchstart,
        tap: navigate,
        swipe: swipe
    });
}
   touchstart: touchstart,            
    tap: navigate,
    swipe: swipe
})}
However there is no documentation for the the filter parameter in the api documentation.  Please provide some documentation for it.


Alexander Valchev
Telerik team
 answered on 20 Dec 2013
1 answer
862 views
I am implementing an Endless Scrolling list view.  I would like to persist the list data items and position when I navigate to a detail view and return.  This works.  I would also like to be able to completely reset the Endless Scrolling list view when I go back to the main app view and return to the Endless Scrolling ListView, just like I had set the Endless Scrolling view itself to data-reload="true".  This is not working for me.

I can reset and clear a normal ListView like this;

contactListSource = new kendo.data.DataSource.create({data:[]});
$("#contacts_list_search_results").kendoMobileListView({
dataSource: contactListSource,
template: $("#contact_list_item_template").html()
});


The paging functionality complicates the clear with the Endless Scrolling list and causes issues when I try to reset the ListView.  The next time I come back to the Endless Scrool List the display starts in the middle of the list, and the first records from the list often don't get displayed. This is what I have so far to clear and rest (it only works if I have not scrolled on the original list, so I believe the issue has to do with a persisted scroll position):

                    $(".km-scroll-container").css("-webkit-transform", "");
                    $("#contacts_list_search_results").data("kendoMobileListView").dataSource.data([]);
                    $("#contacts_list_search_results").data("kendoMobileListView").dataSource._page=1;
                    $("#contacts_list_search_results").data("kendoMobileListView").dataSource._skip=0;

How is it possible to completely clear and reset and Endless Scrolling list view?

Thanks,
Derrick
Alexander Valchev
Telerik team
 answered on 20 Dec 2013
3 answers
278 views
I am using MVC style API to test and develop these tools.
I am using a range slider

    @(Html.Kendo().RangeSlider()
         .Name("yearRange")
         .Min(2000)
         .Max(DateTime.Today.Year)
         .SmallStep(1)
         .LargeStep(5)
         .Values(new double[] { 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2010, 2011, 2012, 2013 })
)

but I cannot see the property to set the initial value of this control.

can someone help me please :)
Hristo Germanov
Telerik team
 answered on 20 Dec 2013
1 answer
218 views
Good day

I have the following task at hand.

I have a datasource which contains my data. I have more data then in the simple example but for explaining it will do.

For example

Name
Phone number
Shoe size
Age

At the moment I get the data from my SQL server by Web API returning JSON and I use a template to display the data on one view.

Now to make the icenium app a bit more userfriendly (I get more daten then in the example) I want to split the data over multiple views and use a tabstrip footer.

so views would be 

view-name
view-phone
view-shoe
view-age

I have no problem implementing the views, tabstrip footer and so on. 

What I don't know is how to split the data into 4 templates to bes used on 4 views . I want to make only one trip to the database of course.

Is this possible?

Markus

Here is the real code I am using at the moment.

Function is called from another view and redirects to the one view at the moment.

function getDetails(userID) {
     
    app.navigateTo("#view-firmen-details") ;
     
    var dataSource = new kendo.data.DataSource({
        type: "json",
        transport: {
            read: {
                url: "http://mobile.mydomain.com/api/T_users/GetUserByID/?id=" + userID,
                data:{
                    Accept: "application/json"
                }
            }
        },
   
      });
 
    $("#notfilterable-details").kendoMobileListView({
        dataSource: dataSource,
        template: $("#firmen-details-template").text(),
        dataBound: function(e) {
            
                 $("#User_text1").html($("#User_text1").html().replace(new RegExp("../images/kunden", "g"), 'http://www.zuol.ch/images/kunden'));
                 },
              
    });
  
}

This is a how I display the data at the moment

<div data-role="view" id="view-firmen-details"  data-layout="drawer-layout-back-firmen-details" data-title="Gewählte Firma" >
 
    <div data-role="content"  class="view-content" >
        <div id="notfilterable-details">
 
        </div>
    </div>
    <script type="text/x-kendo-tmpl" id="firmen-details-template">
        <h2>#=User_firmaname#</h2>
        <h4>
            Adresse & Kontakt
        </h4>
        <p>#=User_strasse# <br /> 
            #=User_plz# #=User_ort# <br /><br />
           Jetzt anrufen: <a href="tel:#=User_telefon#">#=User_telefon# </a><br /><br />
           Seite öffnen:  <a href="javascript:window.open('#=User_internet#','_blank','location=yes');" target="_blank">#=User_internet#</a>  <br /> </p>
        <h4>
            Ã–ffnungzeiten
        </h4>
 
        <table style="width:90%;margin-left:5%;font-size:0.9em;">
            <tr>
                <td>
                    <b>Montag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_montag#
                </td>
            </tr>
            <tr>
                <td>
                    <b>Dienstag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_dienstag#
                </td>
            </tr>
            <tr>
                <td>
                    <b>Mittwoch</b>
                </td>
                <td>  </td>
                <td>
                    #=User_mittwoch#
                </td>
            </tr>
            <tr>
                <td>
                    <b>Donnerstag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_donnerstag#
                </td>
            </tr>
 
            <tr>
                <td>
                    <b>Freitag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_freitag#
                </td>
            </tr>
            <tr>
                <td>
                    <b>Samstag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_samstag#
                </td>
            </tr>
            <tr>
                <td>
                    <b>Sonntag</b>
                </td>
                <td>  </td>
                <td>
                    #=User_sonntag#
                </td>
            </tr>
        </table>
        <p>
            <span id='User_text1'>#=User_text1#</span>
        </p>
 
    </script>
 
</div>


What I basicly want is to spread the content of 

firmen-details-template

on 4 views.


--------------

Hope someone can understand what I am trying to do :-)

Markus

Alexander Valchev
Telerik team
 answered on 20 Dec 2013
5 answers
111 views
My tabstrip should be fixed to the bottom of the screen and stay behind the keyboard when the keyboard opens up, instead it moves up with the keyboard.  As a workaround, I tried doing this when the keyboard opens:

$('#tabstrip-tablet').css('display', 'none');

Then showing it again when the keyboard closes.  This works in the icenium simulator but does not work on the ipad itself.  Why the inconstancy and what is the correct way to handle this?

Kiril Nikolov
Telerik team
 answered on 20 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?