Based on the information in this post:
http://www.telerik.com/blogs/telerik-kendo-ui-q1-2015-has-landed
where it is quoted as:
Grid and TreeList: Both widgets integrate a responsive pager ,which automatically adjusts on different screen widths and provides the ability to define which columns to be hidden on small view ports. This makes them more flexible for mobile web usage.
It makes sense that you are talking about both the responsive pager and also the minScreenWidth feature. I am trying to get minScreenWidth working on the TreeList, but am unable to do so and in the docs it is not mentioned.
Sounds like a feature that has not yet been implemented and is very misleading. Please let me know what the case is.
Thanks,
--Ed
Hi,
I just started using Kendo. I am trying to bind data from AngularJs service to a TreeView without any success. Here is my AngularJs service code:
angular.module('testModule', []).service('testService', ['$q', '$http', '$window', function ($q, $http, $window) { return { get: get }; function get() { var url = $window.location.origin + '/api/testData'; return $http.get(url).then(handleSuccess, handleError); } function handleSuccess(response) { return response.data; } function handleError(response) { if (!angular.isObject(response.data) || !response.data.message) { return $q.reject('An unknown error occurred.'); } return $q.reject(response.data.message); } } ]);Here is my AngularJs controller:
angular.module('testModule') .controller('testCtrl', ['$scope', '$q', '$window', 'testService', function ($scope, $q, $window, testService ) { $scope.testDataFromSvc = {data:[]}; function loadRemoteData() { testService.get().then(function (data) { $scope.testDataFromSvc.data = data; }); } $scope.something = { data: [{ Name: "Thing 1", id: 1 }, { Name: "Thing 2", id: 2 }, { Name: "Thing 3", id: 3}] }; $scope.things = { dataSource: $scope.testDataFromSvc //Doesn't work? What should go here? }; $scope.things2 = { dataSource: $scope.something //this works };} ]);
Here is my html:
<div ng-app="testModule" ng-controller="testCtrl"> <div kendo-tree-view="tree" k-options="things"> //this doesn't display anything <span k-template> {{dataItem.Name}} </span> </div> <div kendo-tree-view="tree" k-options="things2"> // this works <span k-template> {{dataItem.Name}} </span> </div> </div>I checked the data in the "testDataFromSvc" looks similar to what is in "something". At one point it looked like, it displayed the correct data but now I can reproduce it. What is the right way to use the data returned by AngularJs service? Any help is greatly appreciated.
Thanks,
-ana
So, I have a data source set up like this:
var bdModel = kendo.observable({
bdSource: new kendo.data.DataSource({
offlineStorage: {
getItem: function () {
return dtbd
},
setItem: function () {
}
},
...//transport, etc.
schema: {
data: "Main",
model: {
id: "GUID",
fields: {
GUID: { editable: false, type: "string" },
CompanyName: { validation: { required: true }, type: "string" },
CompanyGUID: { validation: { required: true }, type: "string" },
Description: { validation: { required: true }, type: "string" },
LocationGUID: { type: "string" },
StartDate: { type: "date" },
EndDate: { type: "date" },
UserGUID: { type: "string" },
WorkgroupGUID: { type: "string" },
BusDevStatusGUID: { type: "string" },
EstEndDate: { type: "date" },
EstCloseProbability: { type: "string" },
EstTotalValue: { type: "string" },
BusDevFeeStructureGUID: { type: "string" },
SearchGUID: { type: "string" },
BDCode: { type: "string" },
Login: { type: "string" },
Search: { type: "string" },
LocationName: { type: "string" },
CurrencyGUID: { type: "string" },
}
}
}
}),
});
where dtbd is a local variable retrieved from local storage after being set by a function like so:
var bdview = bdModel.bdSource.view()[0]
var myObj = {};
myObj["GUID"] = bdview.GUID;
myObj["BD"] = bdModel.bdSource.data();
systemvariable.push(myObj);
localStorage.setItem("dtBD", JSON.stringify(systemvariable))
It works great for any string fields, but the dates i'm using for kendo datepicker controls don't load properly. Is there an additional step I need to take somewhere to handle the field types properly?
Hi,
I am currently looking at using the scheduler web ui component for one of my clients. I am in the process of building a PoC but am having difficulty setting colour of a schedule event. I understand I can use template to do this, but this only sets the color for the div in the template. I need to set the colour of the entire block of k-event, for example from 10am to 6pm; I want to set the colour, based on a status type property, of the entire block between these times.
Can you please advise.
P.S. getting handle of the k-event class and settings its background colour based on the criteria does not work since it sets all the events to the last colour in the collection.
Hameed.
See attached.
I'm working on populating a dropdownlist in a grid, using data sent down from the server. For the purposes of this question, I have converted my project to local data. I'm having difficulty creating the DDL - the data (JSON object) is shown as [object Object] and I'm not sure how to resolve this issue. Take a look at the function getDropDownListData(). This is called from the column template and should return the option elements for the select, given the JSON object for that row.
Thanks,
--Ed
Hey Guys,
it is possible to replace the click function with ng-click (angularjs)?
For example:
<header data-role="header">
<div data-role="toolbar" data-items='[
{ type: "button", showText: "overflow", id: "flag", text: "Flag", icon: "toprated", click: function(e){ alert("123") } },
{ type: "button", showText: "overflow", id: "flag2", text: "Flag2", icon: "toprated", ng-click: function(e){ alert("123") } },
]'>
</div>
</header>
Greeting
Hi,
Using a kendo ui validator on a form, it seems that pressing the enter key in a text field cause the validate() method to run.
How to prevent this behavior ?
Thank you.
Laurent.
Hi,
I was wondering if it is possible somehow to add data to the drawing elements such as an image or a path? I realise this probably won't be possible with the canvass surface type.
I want to be able to detect a drag start or end so I can drag items onto the surface or to drag items off the surface. I will need to know that the reference number the item is in my system so that's why I want to store data on the elements.
If this is not possible, that would be useful information to me as it would allow me to start considering another framework such as Raphael for what I am trying to achieve.
Thanks in advance
Kenny
is there a way to make kendo work with angular ng-view and using angular routing to load remote views and controllers
for example have something like
<body ng-app="App" ng-controller="AppCtrl" kendo-mobile-application >
<div class="styleView {{pageClass}}" ng-view kendo-mobile-view></div>
</div>
and routing be something like this
App.config(['$routeProvider',
function ($routeProvider, $locationProvider) {
$routeProvider.
when('/group/:id', {
templateUrl: 'pages/group/group.html',
controller: 'ctrl_Group'
}).
when('/Welcome', {
templateUrl: 'welcome.html',
}).
if it is not possible is it posible to have scrollview without initializing kendo-mobile-application?