I've tried the example at http://docs.telerik.com/kendo-ui/third-party/webpack locally, and I'm getting the error:
Module not found: Error: Cannot resolve module 'kendo.dropdownlist' in... [my test file]
Have installed Kendo UI Professional via NPM, following this: http://docs.telerik.com/kendo-ui/intro/installation/npm#kendo-ui-professional
Not sure I can easily share the code, but in the 'node_modules' kendo folder, none of the JS files are minified.
Is there some working example of this somewhere? Not sure if it will run in the Dojo, but I'm at a loss here.
Trav
I'm using a grid with asp.net MVC. Currently the grid is using .DataSource(c => c.Read()) to call a URL that returns an IEnumerable<item> which goes into the grid.
I want to implement paging in the grid. However the data does not have the normal method of paging (count, page number etc.).
Instead when I retrieve my rows I get the data back like this:
{ items: [. . . ], nextPage: 'J23jeg9e93', previousPage: 'oqow0r93285' }
To get the next page you must make the request again for the data, but include the paging token for next or previous page.
At the moment I am only returning the items array. However I want to return all of the data - the items and also the metadata. I must add a button 'Next' and 'Previous' to the grid. When the user presses Next, the 'nextPage' value is sent in the .Read() with the other data, for example:
.Read(r => r.Action("GetItems", "Controller", new { firstName = Model.FirstName, getPage = 'eugwoiejg93239'I understand that I can use the .Data() method to add my own data. However I am not sure how to change .Read to use a property of the return data (.Items) instead of using the data directly, so that I can include metadata for nextPage and previousPage. Also if I add this metadata, I am not sure how to store it (for example in a javascript function I can attach to .Data()).
Do you have any advice on how to do this?
Hello,
I am trying to to use validateInput event of kendo validator using k-on- prefix attribute, but seems like the event never fires, below is the example
http://dojo.telerik.com/OGEjE/5
Thanks
Ketul
The docs for DataSource.filter() indicate that it returns "the current filter configuration. Returns null if no filter criteria are currently applied. Returns undefined if the DataSource instance has not performed filtering so far." I took this to mean if I set a filter via oldFilter = ds.filter(myFilter), I would get the existing filter config back as "oldFilter", just as if I had called oldFilter = ds.filter() without setting one - its a common pattern for setters. However, the method seems to always return "undefined" in all cases when you set a filter. I've created a dojo example.
Am I misreading the intent, and setting a filter wasn't supposed to return the current filter? If so, the "RETURNS" phrasing in the docs really should be clarified. But in that case this might be a worthwhile feature request, since writing "oldFilter = ds.filter(myFilter)" can be more convenient than doing it in two lines "oldFilter = ds.filter(); ds.filter(myFilter)". It looks like the group() method and perhaps others have the same ambiguity.

.net MVC
I have a simple gantt with a single level of tasks. The only action that users can perform is moving tasks. However, I don't want anything to happen after a task is moved. (no postback - it doesn't not need to be saved) I cannot figure out how to avoid an update ajax request after a task is moved.
In the MoveEnd event, I tried calling e.preventDefault(). This does prevent the ajax request, however it also reverts the location of the task back to where it was. I want the user to be able to move the task, I just don't want anything to occur after a task is moved.
How can I achieve this?

Each of our treelists contains an Id column that uniquely identifies the row's object. Our first implementation was rather straightfoward in that we simply got the Id from what we know is the correct column (based on static column ordering):
var row = $(event.currentTarget).closest("tr");var versionId = parseInt(row[0].cells[1].childNodes[1].data);
However, since our users are able to reorder the columns, we're unable to hard-code the cell in order to find the Id of the selected row.
Given a row, how do we find which column is the "Id" column?

Hello,
In scheduler's day view, when I create an event that starts for example at 10:00 AM and ends at 10:00 AM the next day, the event is created, but I can't see this event in the scheduler. You can try this behavior also in this scheduler demo: http://demos.telerik.com/kendo-ui/scheduler/restriction
I know that I can set allDaySlot field to true and see the event at the top row of the scheduler, but I want to see the event inside the scheduler, between the other events.
I have read that it's possible to achieve this by creating a custom view, but I haven't found any source code with a custom view that would solve my problem. Could anybody send me a code that would help me with this?
Thanks for replies,
Boris

I am trying to export a view in my SPA using the kendo drawing api. One of the elements on this view is a tabstrip and I would like to export all of the different tab contents, not just the active one.
I found this post about printing the tabstrip and was thinking I would have to do something like that in my code. This is the export to PDF button click event handler code. This seems to mostly work, only I don't know how to put the tabstrip back the way it was before I made all of the content blocks visible.
e.preventDefault();$("#pageContainer .k-tabstrip .k-content").css("display", "block"); // Show all the tabstrip content blocks$("#span.tabHeader").css('display', 'block'); // Show the tab header spankendo.drawing.drawDOM($("#pageContainer")).then(function (group) { return kendo.drawing.exportPDF(group, { paperSize: 'auto', margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" } });}).done(function (data) { kendo.saveAs({ dataURI: data, fileName: kendo.format('Item - {0}.pdf', viewModel.selectedItem.item) });});// Not really sure how to put the tabstrip back together $("#pageContainer .k-tabstrip .k-content").css("display", "none");$("#span.tabHeader").css('display', 'none'); // Hide the tab header spans
Hello,
I'm trying to adda new task programmatically based on the value of exiting drop down list. The I have is when creating a dependency between newly created tasks. the successorId and the predecessorId are both equal to 0.I checked at the server side, I'm returing the new ID, and at the client side, when checking the content of the dataSource, Ids are up to date with the returned value.
Here is the code. Am missing something?
<script type="text/x-kendo-template" id="toolbarTemplate">
<div>
<input id="types" style="width:250px"/>
<a class="k-button k-button-icontext k-add" href="#" id="AddButton" onclick="addType()" role="option" data-bind="value"><span class="k-icon k-i-add"></span>Add type</a>
</div>
</script>
<div>
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Columns(columns =>
{
columns.Bound(c => c.Id).Title("ID").Width(50);
columns.Bound(c => c.ShortCode).Title("Short code").Editable(false).Width(50);
columns.Bound(c => c.Title).Editable(false).Sortable(true);
columns.Bound(c => c.Start).Title("Start Time").Format("{0:MM/dd/yyyy}").Width(100).Editable(true).Sortable(true);
columns.Bound(c => c.End).Title("End Time").Format("{0:MM/dd/yyyy}").Width(100).Editable(true).Sortable(true);
})
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
}).Tooltip(tooltip => tooltip.Template("#= task.title #"))
.Height(500)
.Date(DateTime.Now)
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.Id);
m.OrderId(f => f.OrderId);
})
.Read("ReadTasks", "Gantt")
.Create("CreateTask", "Gantt")
.Destroy("DestroyTask", "Gantt")
.Update("UpdateTask", "Gantt")
)
.DependenciesDataSource(d => d
.Model(m =>
{
m.Id(f => f.DependencyID);
m.PredecessorId(f => f.PredecessorID);
m.SuccessorId(f => f.SuccessorID);
m.Type(f => f.Type);
})
.Read("ReadDependencies", "Gantt")
.Create("CreateDependency", "Gantt")
.Destroy("DestroyDependency", "Gantt")
)
//.Events(events => events.Edit("edit").Add("add"))
)
</div>
<style>
.k-task-draghandle {
display: none !important;
}
/*.k-gantt .k-gantt-actions:last-child {
visibility: hidden;
}*/
</style>
<script>
function addType() {
var gantt = $("#gantt").data("kendoGantt");
var task = getNewTask();
var taskNew = new kendo.data.GanttTask(task);
gantt.dataSource.add(taskNew);
gantt.dataSource.sync();
}
function getNewTask() {
var combobox = $("#types").data("kendoDropDownList");
var item = combobox.dataItem();
var task = {
id: -1,
orderId: 0,
parentId: null,
title: item.Name,
code: item.code,
start: new Date($.now()),
end: new Date((new Date()).valueOf() + 2 * 1000 * 3600 * 24),
typeId: item.Id,
percentComplete: 0,
type: "Task"
};
return task;
}
$(document).ready(function () {
$($(".k-gantt-actions")[1]).css("visibility", "hidden");
$($(".k-gantt-actions")[0]).html($("#toolbarTemplate").html());
$("#types").kendoDropDownList({
dataTextField: "Name",
dataValueField: "Id",
filter: "contains",
dataSource: {
transport: {
read: {
dataType: "json",
url: "@Url.Action("GetAllTypes", "Type")",
}
}
}
});
$(document).bind("kendo:skinChange", function () {
gantt.refresh();
});
});
//function edit(e) {
// $($(".k-edit-label")[0]).hide();
// $($(".k-edit-field")[0]).hide();
// $($(".k-edit-label")[$(".k-edit-label").size() - 1]).hide();
// $($(".k-edit-field")[$(".k-edit-field").size() - 1]).hide();
//}
//function add(e) {
// //console.log(e.dependency.successorId + " : " + e.dependency.predecessorId);
// //console.log(e);
// try {
// //if(e.dependency.successorId == e.dependency.predecessorId)
// // e.preventDefault();
// //var gantt = $("#gantt").data("kendoGantt");
// //gantt.data
// } catch (e) {
// }
//}
</script>

Hi,
I cant find a method for changing the content of textBlock text appended to a shape. In this demo: http://dojo.telerik.com/IDEnA , there is a method for changing the color of the shape, is there a similar method to change the textBlock text. any help ? thank you.