Telerik Forums
Kendo UI for jQuery Forum
1 answer
615 views
Hi I'm trying to format a 10 digit phone number via the template property in the column definition.  The following does not work, but shows what I am after:

{
field: "phone",
title: "Phone Number",
template: '#= kendo.toString(phone,"(###) ###-####") #'
}

Any suggestions.  I also tried escaping the hash symbols with \\, but that did not help. 

Thanks in advance,

Jonathan
Georgi Krustev
Telerik team
 answered on 03 Jul 2012
6 answers
429 views
I have a ListView in a Mobile View that wires to an ASMX datasource.  Works great and shows me a nice loading message while the data is retrieved.

I then Added a main view with a menu of options, and moved the init of the ListView to the data-show event on the Mobile View it was moved to.  Now I do not get a Loading message while the data is retrieved for my ListView  

Is this normal behavior?

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Default.Master"
    CodeBehind="default.aspx.vb" Inherits="Mobile._default1" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div data-role="view" data-title="Mobile Home" id="home" data-transition="slide">
        <header data-role="header">
            <div data-role="navbar">
                <span data-role="view-title"></span>
            </div>
        </header>
        <ul data-role="listview" data-style="inset">
            <li><a href="#myDatabase">My Database</a></li>
            <li><a>My Favorites</a></li>
            <li><a>My To-Do's</a></li>
            <li><a>My Proposals</a></li>
            <li><a>My Alerts</a></li>
        </ul>
    </div>
    <div data-role="view" data-transition="overlay" data-title="My Database" id="myDatabase"
        data-show="getMyDatabase" data-layout="mobile-view">
        <ul id="myDatabaseList" data-style="inset" data-role="listview">
        </ul>
    </div>
    <div data-role="layout" data-id="mobile-view">
        <header data-role="header">
            <div data-role="navbar">
                <a class="nav-button" data-align="left" data-role="backbutton">Back</a> <span data-role="view-title">
                </span><a data-align="right" data-role="button" class="nav-button" href="#home">Home</a>
            </div>
        </header>
        <footer data-role="footer">
            <div data-role="tabstrip">
                <a data-icon="contacts">My Database</a> <a data-icon="recents">To-Do</a> <a data-icon="bookmarks">
                    Proposals</a> <a data-icon="about">Alerts</a>
            </div>
        </footer>
    </div>
    <script id="myDatabaseTemplate" type="text/x-kendo-template">
        <div style="font-weight:bold;font-size:22px">#= Name #</div>
        <div style="font-weight:normal;font-size:15px">(ID: #= ID #)</div>
    </script>
    <script type="text/javascript">
        var app = new kendo.mobile.Application();
 
        /////// Handle My Database View
        function getMyDatabase() {
            $("#myDatabaseList").kendoMobileListView({
                dataSource: dataSourceMyDatabase,
                template: $("#myDatabaseTemplate").text(),
                pullToRefresh: true
            });
        }
 
        var dataSourceMyDatabase = new kendo.data.DataSource({
            transport: {
                read: {
                    contentType: "application/json; charset=utf-8",
                    url: "http://localhost/MyDatabase.asmx/Test",
                    dataType: "json",
                    data: { UserID: "JS" }
                },
                //data: { UserID: "JS" },
                parameterMap: function (options) {
                    return kendo.stringify(options); // kendo.stringify serializes to JSON string
                }
            },
            schema: {
                data: "d.MyDatabase"
            }
        });
 
        ///////
 
    </script>
</asp:Content>

I may have broken something, because the ListView no longer scrolls and the PullToRefresh doesn't work (in Chrome) when fired this way
Georgi Krustev
Telerik team
 answered on 03 Jul 2012
0 answers
125 views
The title says everything for the most part.

I opened a modal window and then was able to tab to the input fields on the form and make changes.  I was able to do this in Chrome and IE9.  Is there something I can do to stop this behavior?

Side Note:

I just started working with Kendo UI and it has be a joy.  Great Work!!!
Tony
Top achievements
Rank 1
 asked on 02 Jul 2012
4 answers
201 views
Hi, 
it's probably very easy, but I can't get it working: How can I maximize a Dataviz chart inside a mobile view, so it is also responsive to change from  vertical to horizontal look?



Don
Top achievements
Rank 2
 answered on 02 Jul 2012
6 answers
131 views
Kendo UI,

Can the DataViz and Mobile controls be used together so that I can generate charts on say an iOS device?

Regards,

Jason
Don
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
160 views
I'm trying to implement a way to keep track of line numbers in the editor. So far I have gotten 

First line here.<br data-line="" />
Additionally for the paragraph tags I have 
<p data-line="">Second line here</p>

I've been looking for a consistent way to get either a count of all lines in the document through the Range Object or some other way to get a line number count. Simply counting the <br/> or <p> elements might work but I haven't been able to get this either.
Thanks for any ideas.
Jesse
Top achievements
Rank 2
 asked on 02 Jul 2012
0 answers
96 views
How do I add a change event function to an autocomplete that is in a popup editor template. I do not want to use a combobox or dropdownbox because there are too many values, but I want to bind the id value in the data model, not the text field.

<input name="Location" 
    data-source="locationDataSource"
    data-text-field="Combined" 
    data-value-field="id"
    data-filter= "startswith"
    data-role="autocomplete" 
    data-placeholder= "Type the location number..."/>

Cyndie
Top achievements
Rank 1
 asked on 02 Jul 2012
1 answer
100 views
What am I doing wrong... I'm just trying to get a simple view to render correctly... but it's just displaying plain HTML... I copied and pasted the demo app from Kendo UI Mobile Application, but it just shows up as plain HTML... where am i going wrong?? See attached.... Thanks in advance!
Scott
Top achievements
Rank 2
 answered on 02 Jul 2012
2 answers
120 views
I'm just copying and pasting the demo's onto my machine and can not get them to render correctly when switching user agents.... What am I doing wrong? See attached....
Scott
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
118 views
hello,

Maximize not work in Maximize mode when window open on page load please review the attach image.

Thanks
Wajahat
waji imam
Top achievements
Rank 1
 asked on 02 Jul 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?