Right now I'm working through removing an item from the grid. I can't seem to find a way to use the destroy transport to mark a row as one that should be deleted, make a request to delete those rows, and only if those rows were successfully deleted from by a service, THEN visually remove the row from the grid. Everything I try (grid.removeRow, dataSource.remove, dataSource.sync) just removes the row from the grid right away, before the request is made to the server to remove the row. I need the ability to notify the user of a failed attempt to remove those rows, and keep those rows displayed if the service was unable to delete those rows.
Any ideas?
Hi,
I'd like to use the Grid's detailTemplate, but is it possible to only render it based on a condition?
Example: http://dojo.telerik.com/uyIja
This is a basic example, that only displays the template contents if the 'male' field is true. But is it possible to prevent the details template drop down arrow from being displayed, I mean its useless displaying a way to view a details template if its empty.
Thanks,
Grant
Hi,
I have a data model for an everlive datasource, and I've added some extra fields that help manage some functions around what is displayed in a ListView. However I don't want the extra field saved back to the dataSource when it is synced.
I've sketched what I thought might work below. Am I on the right track? And/or what sort of code would I need to ensure the showAnimalDetails is not saved?
Many thanks
-Paul
In the following, the animalName is from the dataSource and the showAnimalDetails is an extra field.
01.var animalModel = {02. id: 'Id',03. fields: {04. animalName: {05. field: 'animalName'06. },07. showAnimalDetails: {08. defaultValue: false09. }10. ...
That all works fine. However, I don't want to include the showAnimalDetails field when I sync the dataSource back via Everlive.
I thought the way to do it would be like this ...
01.var animalsDataSource = new kendo.data.DataSource({02. type: 'everlive',03. schema: {04. model: animalModel05. },06. transport: {07. typeName: 'Animals', 08. update: function(options) {09. // Put code here to remove extra field before sync?10. }11. }12.});Hi,
I'm using MVVM paradigm with the kendo scheduler. I am attempting to add custom templates for editing and display of tasks. Using the following code the templates seem to be ignored and the default templates used instead. These templates are fine, I use them in non MVVM mode.
<div id="responsiveCalendarView">
<div class="k-content wide">
<div>
<div id="responsiveCalendar"
data-role="scheduler"
data-views="[{ type: 'day', title: 'Day' },
{ type: 'week', title: 'Week', eventTemplate: $('#event-template').html()},
{ type: 'workWeek', title: 'Work Week'},
{ type: 'agenda', title: 'Agenda' },
{ type: TasksView, title: 'Tasks' }]"
data-editable= "{template: $('#customEditorTemplate').html()}"
data-bind="source: tasks,
visible: isVisible,
events: {edit: onEdit, requestStart: requestStart, requestEnd: requestEnd, navigate: navigate, dataBound: dataBound, dataBinding: dataBinding}" style="height: 800px"></div>
</div>
</div>
</div>
Has anyone else had similar problems using templates with MVVM on the scheduler? Has anyone successfully used templates in the scheduler with MVVM?
Appreciate any assistance.
My back-end prefers a null value in the primary key for adding new records, but kendo uses 0 for numeric fields. If I change the "defaultValue" for a numeric model field that is defined as the 'id' field for the model, will this cause any problems with create operations or anything else that deals with new instances of the model? Model has a "isNew" function, so it looks like things should work even if the defaultValue is changed from the normal zero value, I just wanted to be sure in the real world there won't be any nasty side-effects or anything that explicitly compares to zero instead of relying on isNew(). So:
var dataSource = new kendo.data.DataSource({ schema: { model: { id: "dbID" fields:{ dbID: {type:"number", defaultValue:null}, } } }});
Hi,
Please have a look at http://jsbin.com/noqaqitoko/edit?html,css,js,console,output
I've tried to hook something up to the sync promise, but it is not called, why is that?
Hi,
So I have Treeview that reads Channel Data from a remote Hierarchical DataSource:
var hierarchical_dataSource_channelNodes = new kendo.data.HierarchicalDataSource({ transport: { read: { url: "/planner/channelnodes/forTree", type: "GET", dataType: "json" } }, schema: { model: { id: "id", hasChildren: "hasChildChannelNodes" } }});
So as above, tree nodes (child channels) are retrieved on an as needed bases, when a node is opened, this is donw by executing this URL: "/planner/channelnodes/forTree/1" (for example I expans the first node).
So this is where my issue starts, Id like to implement serverFitlering as well, how can I also execute a filter (ie. add the filter param to the URL) when a tree node is expanded and the read URL is executed? Is there a way to execute a read and filter together or to append the 'filter' param & value to the read URL during a 'requestStart' or 'parameterMap' or a read request?
Thanks and kind Regards,
Grant
