Telerik Forums
Kendo UI for jQuery Forum
2 answers
78 views
I've got a grid:
$('#myGrid').kendoGrid({
    ...
    scrollable: false,
    ...
});
and I've tried all of these things to change the scrollable property:
$('#myGrid').data("kendoGrid").options.scrollable = true;
$('#myGrid').data("kendoGrid").refresh();
 
$('#myGrid').data("kendoGrid").scrollable = true;
$('#myGrid').data("kendoGrid").refresh();
 
var MyGrid = $('#myGrid').data("kendoGrid");
MyGrid.options.scrollable = true;
MyGrid.refresh();
 
var MyGrid = $('#myGrid').data("kendoGrid");
MyGrid.scrollable = true;
MyGrid.refresh();
Nothing works. How does one change whether a grid is scrollable on the fly?
Vladimir Iliev
Telerik team
 answered on 17 Oct 2013
1 answer
192 views
I have a datasource (array) with Knockout observable properties.
I want the grid to display the value of the observable in the grid.

Grid configuration excerpt:
columns: [
                    { field: "Name"}
]

Here, Name is a Knockout observable. But it doesn't work, because the grid expects a normal js property.
Is there a way to get this working without converting all observables back to normal properties?

Atanas Korchev
Telerik team
 answered on 17 Oct 2013
3 answers
242 views
My view contains a lot of content, and I wish to give the user shortcuts to scroll to specific parts of the page.

I see that it's possible to scroll using scrollTo, but the value has to be given as a number. As screen sizes vary I don't know the specific height values for the different places I wish to scroll.

Is there a smart way to for example scroll to the element with id="ScrollPosition1"?
Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
5 answers
72 views
Endless Scrolling Issues Since Update!
OK another thread as I've worked out my woes are to do with endless scrolling and the kendo update changes.
All I want is to retrieve my data and have it endlessly scroll like it did before. But it appears broken.


This works:
http://jsbin.com/aNApID/8/


This doesn't (its my datasource)
Note: Ive hidden my access keys with 'HIDDEN' so it won't work if you do get the syntax right, I just want to be pointed in the right direction

var dataSource = new kendo.data.DataSource({
    pageSize: 10,
    serverPaging: false, //specifies whether the paging should be handled by the service
   transport: {

                read: {
                type: 'GET',
                headers: {'X-Parse-Application-Id':'HIDDEN','X-Parse-REST-API-Key':'HIDDEN'},
                url: "https://api.parse.com/1/classes/Listings/?where={\"State\":\"VIC\",\"EndDateTime\":{\"$gte\":{\"__type\":\"Date\",\"iso\":\""+localStorage.ls_tempdate+"\"}}}&order=StartDateTime",           
                dataType: "json" // JSONP (JSON with padding) is required for cross-domain AJAX
                    },
        parameterMap: function(options) {
            var parameters = {
                q: "javascript", //additional parameters sent to the remote service
                rpp: options.pageSize,
                page: options.page //next page
            };

            return parameters;
        }
    },
    
 schema: { // describe the result format
        data: "results" // the data which the DataSource will be bound to is in the "results" field
    }
});

Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
1 answer
49 views
i've got a strange problem using transport.destroy:

First i have a Listview with a swipe event to open the delete option.
i did implement this: http://demos.kendoui.com/mobile/listview/editing.html#/ in my app.
everything work fine, except destroy will be called for X+1 (x = deleted items)

At first deletion it will be called once, at the 2nd time it will be called twice and so on.

Here is the JSBin: http://jsbin.com/AGAGUfE/11/

Did i implement something false?
or is it a bug in Kendo UI mobile? (i think kendo Ui is the same)


Thanks for your help
domiSchenk
Top achievements
Rank 1
 answered on 17 Oct 2013
2 answers
83 views
Hi,
I m create a kendo Excel grid with hierarchy. And last column I added a action button.
I need to get first column data of the grid when clicking that edit button.

This is my try. But its not working.

function On Click(e) {
        e.preventDefault();
        var element = $(e.target);
        var grid = element.closest("[data-role=grid]").data("kendoGrid");
        var dataItem = grid.dataItem(element.closest("tr"));

        alert(dataItem.ProductID);
       
    }

Thanking
Håkan
Top achievements
Rank 1
 answered on 17 Oct 2013
2 answers
302 views
I am experiencing a strange issue with my kendo grids; if I delete a row, the row is successfully removed, and the XHR DELETE request is successful. Any subsequent inserts or updates to my kendo grid however, are always sending an extraneous DELETE request, and failing. 

Also, if I delete multiple rows from my grid, then any subsequent inserts or updates will send multiple extraneous DELETE requests, one for each of the earlier successful deletes.

The extraneous DELETE requests are failing (status 500). Presumably because the rows in question have already been deleted. This causes the insert/update to fail as well.

Any clue to what's happening? Does the kendo grid queue up the DELETE requests but is somehow keeping successful DELETE requests in this queue?

Thanks in advance.
Patrick
Top achievements
Rank 1
 answered on 16 Oct 2013
2 answers
7.4K+ views
I am calling a WCF webservice which exposes a POST method for login (returns user data if successful).  When I make the call via jQuery Ajax it works as expected, but when I make the equivelant Kendo UI DataSource call it fails.  Here are the basics:

VARIABLES USED IN THE SAMPLE CODE:
jsonData = {"userName":"abc123","password":"abc123"}
url = "../Authentication.svc/Login3"

KENDO CALL (fails):
---------------------
var dataSource = new kendo.data.DataSource({
    transport: {
               read: {
                       url: url,
                       dataType: "json",
                       data: jsonData,
                       type: "POST",
                       contentType: "application/json",
                       processData: false
                     }
               }
});

REQUEST PAYLOAD AS SHOWN IN NETWORK TAB OF CHROME DEBUGGER:
[object Object]
RESULT: 400 - Bad Request
------------------------------------------

AJAX CALL (works!):
-----------------
$.ajax({
         url: url,
         type: "POST",
         contentType: "application/json",
         data: jsonData,      
         processData: false,  
         dataType: "json"    
 });

REQUEST PAYLOAD AS SHOWN IN NETWORK TAB OF CHROME DEBUGGER:
{"userName":"abc123","password":"abc123"}
RESULT: 200 - Successful

Any ideas or assistance would be appreciated.

Doug

Jerome
Top achievements
Rank 1
 answered on 16 Oct 2013
2 answers
256 views
See: http://www.kendoui.com/forums/kendo-ui-dataviz/chart/column-chart-showing-too-many-labels.aspx#csZezjCekEKfhtaq6IxepA

Currently I've got the following code in my chart:
categoryAxis: {
    baseUnit: "fit",
    autoBaseUnitSteps: {
        seconds: [],
        minutes: [],
        hours: [],
        days: [1],
        weeks: [1],
        months: [1,3],
        years: [1]
    },
    maxDateGroups: 36,
    majorGridLines: {
        visible: false
    }
}
However, the date range being used in the chart is dynamic, and sometimes the quarters will be Feb May Aug Oct. It would be a really nasty workaround to force the data into the correct quarters. A quarter is not the same as 3 months in the same way that a week is not the same as 7 days. Kendo automatically lines weeks up on Sundays. Please consider doing something similar for quarters.

Even more useful would be the option to configure which day of the week or which month in the quarter to base the week or quarter on. I might want my week to start on Saturday or Monday.
Deej
Top achievements
Rank 1
 answered on 16 Oct 2013
4 answers
280 views
If you have a ListView bound to a DataSource with endless scrolling enabled, once you reach the end of the DataSource, you cannot get it to load additional pages of data again. This becomes an issue when you change the data in your ListView by re-querying the data source (through the "filter" and/or "query" functions on the DataSource object). 

In our specific scenario we have 2 views. The first view, "View A," contains inputs. The second view, "View B," contains the ListView that is bound to a DataSource and has endless scrolling enabled. When the user enters data in the inputs on View A and clicks the submit button, we call the query() function on the DataSource passing the data from the inputs and navigate to View B. The user can then click Back, change the search parameters on View A, hit Submit again, and view the results of the new parameters on the ListView in View B.

This works great, as long as the user never scrolls to the end of the data in the DataSource. Once they do this once, they can never scroll beyond the first page of data again without restarting the app.

Is this just a limitation of the ListView and endless scrolling, or are we missing something?

Thanks,
Jonathan Marston



Petyo
Telerik team
 answered on 16 Oct 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?