Telerik Forums
Kendo UI for jQuery Forum
1 answer
108 views
Hello,

I was wondering if it was possible to get the selected element from the DOM when the user selects an item in the list?  I can't find it in the details of the argument...

Thanks.
Georgi Krustev
Telerik team
 answered on 04 Feb 2013
1 answer
123 views
Dynamic data is not appearing in the list. Data is fetched dynamically in jsonp format. When checked in Chrome developer tools i am able to see the response. Please find the code below. Can someone help me here ? 

<!DOCTYPE html>
<html>
<head>
    <title>Pull to refresh</title>
    <script src="../../lib/jquery.min.js"></script>
    <script src="../../lib/kendo.mobile.min.js"></script>
<link href="../../lib/styles/kendo.mobile.all.min.css" rel="stylesheet" />
    <link href="../../lib/styles/kendo.common.min.css" rel="stylesheet" />
</head>
<body>
    <a href="../index.html">Back</a>
    <div data-role="view" data-init="mobileListViewPullToRefresh" data-title="Pull to refresh">
   <header data-role="header">
       <div data-role="navbar">
           <span data-role="view-title"></span>
           <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
       </div>
   </header>

   <ul id="pull-to-refresh-listview"></ul>
</div>

<script id="pull-to-refresh-template" type="text/x-kendo-template">
        #= Title #
</script>

<script>
    function mobileListViewPullToRefresh() {
            var dataSource = new kendo.data.DataSource({
                serverPaging: true,
                pageSize: 1,
                transport: {
                    read: {
                        url: "http://localhost/MvcMovieApp/Mobile/RestResponse", // the remove service url
                        dataType: "jsonp" // JSONP (JSON with padding) is required for cross-domain AJAX
                    },
                    parameterMap: function(options) {
alert(kendo.stringify(options));
                    return {
                            q: "javascript",
                            page: options.page,
                            rpp: options.pageSize
                            since_id: options.since_id //additional parameters sent to the remote service
                        };
                    }
                },
                schema: { 
                    data: "movies" // the data which the data source will be bound to is in the "results" field
                }
            });

alert("Before kendoMobileListView");
        
        $("#pull-to-refresh-listview").kendoMobileListView({
            dataSource: dataSource ,
            pullToRefresh: function(){ alert("dataSource"); return true },
            appendOnRefresh: true,
            template: $("#pull-to-refresh-template").text(),
            endlessScroll: true,
            pullParameters: function(item) {
                return {
                    since_id: item.id_str,
                    page: 1
                };
            }
        });
    }
</script>

    <script>
        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
    </script>
</body>
</html>

JSONP which i am receiving is :
({"movies":[{"ID":1,"Title":"Movie 1","ReleaseDate":"\/Date(1355250600000)\/","Genre":"Comedy","Price":10},{"ID":2,"Title":"Movie 2","ReleaseDate":"\/Date(1355250600000)\/","Genre":"Thriller","Price":10}]})
Alexander Valchev
Telerik team
 answered on 04 Feb 2013
1 answer
88 views
I've been trying to get my comboboxes cascading correctly using the guide on the Cascading ComboBoxes page and I think the information there may be incorrect. I wanted to use the approach where I set the parameters manually and copied the code at the very bottom of the page:

$("#child").kendoComboBox({
   cascadeFrom: "parent",
   dataTextField: "childName",
   dataValueField: "childID",
   dataSource: {
       transport: {
           read: {
               url: "",
               data: {
                   parentID: $("#parent").val()
               }
           }
       }
   }
});

This doesn't work, since I believe parentID: $("#parent").val() is interpreted at set up time, rather than when cascading. The correct code for the data portion would be: 
data: function() {
    parentID: $("#parent").val()
}

In the answer there's a reference to the "How it works" section - I couldn't find this, could a link be provided if it still exists? 
Georgi Krustev
Telerik team
 answered on 04 Feb 2013
1 answer
90 views
Hi

I have a search screen, that lists a amount of contacts, when a user clicks on the details button on one of the list items, I want to load another view with the details of the contact.  However I am not even getting data to display.  I am not sure how I can go about troubleshooting this problem.  I have referenced this forum post ListView not working with data-bind but to no avail.

<div data-role="view" id="contactView" data-model="ContactViewModel" data-show="contactShow">
        <h1 id="ContactHallo">Contact Screen</h1>
        <ul id="contactDetailList" data-role="listview" data-style="inset">
        </ul>
</div>
function contactShow(e) {
   ContactViewModel.LoadContacts();
};
<script id="contactDetailtemplate" type="text/x-kendo-template">
    <a href="tel:#:data.MobileNumber#">#:data.MobileNumber#</a>
</script>
var ContactViewModel = kendo.observable({
    ContactId: null,
 
    TestData: [{ AssociatedContactType: "n\/a", AssociatedProperties: [], EmailAddress: "n\/a", FName: "User1", HomeNumber: "n\/a", LName: "LastName", MobileNumber: "+27 21 0823219213", WorkNumber: "n\/a" }],
 
    ContactData: new kendo.data.DataSource.create({ data: this.TestData }),
 
    LoadContacts: function(){
        var templatePart = $("#contactDetailtemplate").text();
        $("#contactDetailList").kendoMobileListView({
            dataSource: this.ContactData,
            template: templatePart,
            endlessScroll: true,
            scrollTreshold: 30
        });
 
    }
});
I have also created a JSFiddle

Thanks
Rihan
Alexander Valchev
Telerik team
 answered on 04 Feb 2013
1 answer
164 views
Hi,

Up to now I have been using local binding but now I need to show a grid using remote binding. I have defined a WCF method that is being called e returns a DataSourceResult. This class was picked from grid-wcf-crud code sample.

public class DataSourceResult
{
    /// <summary>
    /// Represents a single page of processed data.
    /// </summary>
    public IEnumerable Data { get; set; }

    /// <summary>
    /// The total number of records available.
    /// </summary>
    public int Total { get; set; }
}


I have defined the Read function like this:

var properties = { url: url, data: data, type: 'POST', dataType: dataType, contentType: 'application/json', 
                               cache: false, success: OnSuccess, error: OnError };

$.ajax(properties);

Debugging the WCF method I can see that it is being called correctly and the returned data is OK. But I am receiving a 12152  error code in the javascript.

What could it be ?

Thanks in advance
Atanas Korchev
Telerik team
 answered on 04 Feb 2013
1 answer
98 views
Hi,
I can't figure out why my chart is not getting updated, and I think I've tried just about anything.
Here is a snippet:
http://jsfiddle.net/NShJ9/

When I run it in a browser, I get "Error: 'prb' is undefined", which makes no sense to me...

Here is a similar one that works... http://jsfiddle.net/aHFwc/6/
Thank you!
Holger
Top achievements
Rank 1
 answered on 04 Feb 2013
0 answers
40 views
hi.
the panes's size only changed when release the mouse, I want change the pane's size when i move the mouse, I need let the pane live resize, so I want add a mouse move event to the spliter, how can i extend the  splitter to add a mousemove enent to it?
thanks!
mjohn mjohn
Top achievements
Rank 1
 asked on 04 Feb 2013
4 answers
79 views
Hi,

I've been using the ASP.NET AJAX (Webforms) component of Telerik for quite some time, even though I haven't used them in the last year. As I am now involved in several Microsoft MVC projects I again started to look at the demos of the Telerik components for MVC but I have to admit that I wasn't really that impressed with what I saw with regards to how it looked. I just never got the WOW-factor that the ASP.NET AJAX components offer. Take the demos for Combobox/dropdown as example, in the ASP.NET AJAX demos there are several good looking solutions like easily integrated checkboxes, styling etc but when looking at the same examples for MVC, it kind of just looks like Microsofts standard components to me. So, the obvious question here to the community, is it just that the demos for ASP.NET AJAX are much better or are the ASP.NET MVC components quite limited when it comes to design, visual appeal etc?

I realize that there is of course many other advantages with Kendo UI like mobile support, HTML5 etc. etc. and that the broad support for this might hamper the possibilities to deliver a web experience with that extra WOW factor. But for this project, I am more looking for something that can be used in a "standard web application" to get a user experience that isn't as boring and uninspiring as the standard Microsoft components offer, without having to do it all yourself in CSS etc (ie rapid development).

Or to put it in another way, if I want to convince a decision maker to go with ASP.NET MVC (Kendo UI) to get a richer and more pleasant user experience for a standard MVC web application, is Kendo UI the way to go and if so, how do I convince them as I find that the demos themselves won't really make it an easy sell like with the ASP.NET AJAX components? This is an internal web application for a company in a controlled environment, so mobile support, HTML5 etc won't really impress as much as it might have done for a public site.

Looking forward to hearing your comments on this! Please prove me wrong :)
improwise
Top achievements
Rank 1
Iron
Iron
 answered on 03 Feb 2013
2 answers
266 views
I am working with a kendo grid with some drop downs but I am running into issues with how the data is send back to the server.
I do not want to provide default settings for the combo boxes but if I don't I only get the id rather than the full object sent back to the server.  With my datasource below I correctly get no default set however I am only given by the id - not the full object.  Can I define the data structure of Site and Role within the schema without setting a default value?
new kendo.data.DataSource({
                transport: {
                    read: {                      
                        url: "json/users/getXForUser/" + userID,
                        dataType: "json"
                    },
                    create: {
                        url: "json/users/createUpdateX/" + userID,
                        type: "POST"
                        
                    },                  
                schema: {
                    model: {
                        id: "ID",
                        fields: {
                            Site: { }, // this is a combobox result and I want the object back with ID and Name
                            Role: { } // this is a combobox result and I want the object back with ID and Name
                        }
                    }
                }
            });
Travis
Top achievements
Rank 1
 answered on 02 Feb 2013
5 answers
121 views
I was running version 2012.2.913 and the input was still showing the "flying text box" on an HTC EVO 4G with Android 2.3.5.  

My understanding was that this was "fixed" in the Q2 release.  I don't think it was 100%.  It did work fine on an HTC EVO 4G LTE with Android 4.x, but not an HTC EVO 4G running 2.x.

So I decided to try the latest internal build.  I'm now running 2012.2.1002.  That seems to have gotten rid of the flying text box, but there is still an issue with not being able to "long press" a key on Android 2.x AND 4.x.  I'm running Android 4.0.3 and the long key presses result in double characters just as they do on 2.x.

Is there any hope for a fix in the future?  It does not appear that it's going to be addressed in Android, and I know for a fact that even if it was, HTC is not longer making releases for the EVO 4G, so it would not matter.  I understand that it appears to be an Android issue, but does that mean that we have no real solution for the HTC Android users?

Also, version 2012.2.1002 broke the styling on Navbar buttons on 2.x and 4.x devices.  The buttons are cut off on the bottom and appear too large.

[EDIT] - After playing with this some more, the 2012.2.1002 build prevents the flying/double text box input, however, you can't see the data input on any text boxes that are under the popup keyboard.  This makes it unusable.  

Sean
Kamen Bundev
Telerik team
 answered on 02 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?