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?
It looks more like a bug, but maybe I missing something.
I've modified virtual scrolling demo to load specific page http://dojo.telerik.com/ahEPE
and I see that it loads requested data properly, but scrollbar position is not updated.
When I try to scroll it it resets displayed data to first page because of incorrect scrollbar position.
i am unable to indent last node in treelist is their any possibility?