Telerik Forums
Kendo UI for jQuery Forum
0 answers
139 views
$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: reportDS,
        columns: [
                    { field: "ProductID", title: "Product ID", width: "25%" },
                    { field: "ProductName", title: "Product Name", width: "25%" }
                 ]
    }); 
});
var urls = "http://....../GetData";
var reportDS = new kendo.data.DataSource({
transport: {
        read: {
            url: urls,
            dataType: "jsonp",
        }
    },
    schema: {
        type: "json",
        data: function (data) { return eval(data.Result); }
    },
    requestStart: function (e) {
        alert("Requested Started");
    },
    change: function (e) {
        alert("Change");
    },
    error: function (xhr, textStatus) {
        alert("Error : " + xhr.xhr.status);
    },
    /*error: function (e) {
    var xhr = e.xhr;
    var statusCode = e.status;
    var errorThrown = e.errorThrown;
    document.getElementById("Error").innerHTML = xhr + statusCode + errorThrown;
    },*/
});




Hello,
I am trying to trace server error like
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
and want to display custom message for user.  
Above code work fine when my service is running whereas when i stop my service and restart my kendo application. I get error Error : 200 as alert in internet Explore 8 and no message/alert box  in Google Chrome and FireFox..
Please help me out to clear my mistake...

Thanks and regard,
Deepak
Engifaar
Top achievements
Rank 1
 asked on 04 Jul 2012
1 answer
329 views
I can't see any difference between the two.
Any subtle difference?
I was expecting ActivateTab to enable a tab if disabled and select it.
But that's not the case.
Kamen Bundev
Telerik team
 answered on 04 Jul 2012
0 answers
131 views
Hello,
I am using Kendo datasource with RESTFUL WCF Service. It is working fine with every aspect. Now i want to trace Service status(Open /Closed) and want to display user friendly error message such as "Server is temporarily down!!"
Can anyone plz helk me out...
Thank you,
Deepak 
Engifaar
Top achievements
Rank 1
 asked on 04 Jul 2012
1 answer
56 views
Currently, the model binder for the DataSourceRequest (which is DataSourceRequest) throws an error when trying to use the "Contains" operator. This is reproducible in your demos.

Thanks in advance for the fix! ;)
Alex
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
257 views
Or am I supposed to put all of the code on one page? Every time I try to use href to link to another html file that has kendo code in it, it links to #nameofhtmlfile.html on the same page (meaning it doesn't go anywhere and just appends #nameofhtmlfile.html at the end of the current url.

Please help! :(

Edit: To clarify: In Kendo, to go to the next page, you need both of the "pages" in one html file and then use some sort of event to send you to the next 'page'. I wanna put the 'pages' in separate html files if possible.
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
0 answers
116 views
Hi 

if I create kendoGrid like this:

$('#grid').kendoGrid({
            dataSource: {
                data: [{Name: 'Alex', Age: 44}, {Name:'David', Age: 13}]
             },
            rowTemplate: kendo.template($('#row-template').html()),
        });


the template looks this:
 <script id="row-template" type="text/x-kendo-template">
        <tr class="k-grid-edit-row" ">
            <td>
                <input data-bind="value: Name"/>
            </td>
            <td>
                <inputd ata-bind="value: Age"/>
            </td>
        </tr>
    </script>

then I see the grid rendered correctly but the databinding is not working at all.

thanks
david
Top achievements
Rank 1
 asked on 04 Jul 2012
0 answers
84 views
Hi,

Did anybody made any success with kendoui grid pagination or virtualization with upshot dataSource?
Any tips or sugestions?
In this moment I am able to display data (using Knockout-Kendo.js) from my ViewModel which contains upshot dataSource. All CRUD operations works fine but I need a server pagination or virtualization. Naturaly, don't want to load all data to my viewModel.

Thanks
/KrisD 
Kristijan
Top achievements
Rank 1
 asked on 04 Jul 2012
5 answers
135 views
How does the validation "work" in that what happens when I setup validation on a form element.

When you call validate() it loops though all required inputs in that form and runs every rule on each of them?...or does it run on every input in that form.

So then if the rules run per input (seems like this from the demo) can you not setup a global rule that says something like "Count all checked checkboxes on the page and make sure the count is greater than 10"

Does that make sense?
Rosen
Telerik team
 answered on 04 Jul 2012
1 answer
320 views
I am trying to create reusable pieces of code that can be declaratively bound using the Kendo MVVM framework.  Here is an example of what I mean:

template.tmpl
<div>
  <p>This is rendering of the ${viewModel} view model</p>
  <span data-bind="text: ${viewModel}.data">
</div>

test.html
<script id="viewTemplate" type="text/x-kendo-tmpl" src="template.tmpl">
<script type="text/javascript" src="test.js" />
<div data-template="viewTemplate" data-bind="source: viewData.viewModel1">
<div data-template="viewTemplate" data-bind="source: viewData.viewModel2">

test.js
var viewModel = kendo.observable({
  viewData: {
    viewModel1: {
      viewModel: "viewModel1"
    },
    viewModel2: {
      viewModel: "viewModel2"
    }
  },
  viewModel1: {
    data: "I am the data for view model 1".
  },
  viewModel2: {
    data: "I am the data for view model 2".
  }
})

This example works fine when the template is within test.html.  However, when I try to separate out the template into it's own template.tmpl file, it does not work.  What am I doing wrong? 
Atanas Korchev
Telerik team
 answered on 04 Jul 2012
0 answers
87 views
Hi,

can you provide an example of how to manage the onchange event for a dropdown control in kendo mobile?

thanks a lot
mauro
Mauro
Top achievements
Rank 1
 asked on 03 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?