Telerik Forums
Kendo UI for jQuery Forum
1 answer
196 views
 Hi,

This looks like a bug in Kendo UI Grid. Please try the following:

a) On the hierarchy example, turn off paging and turn on scrolling, but set the Employees grid to be scrollable. The scroll bar will then correctly take account of the child (orders) grid.

b) Now set .Scrollable(scrollable => scrollable.Virtual(true)) in the parent grid. The vertical scroll bar is no longer active, making scrolling in the child grid impossible.

This really needs to be fixed. It is quite common to have very large ( over 10000 row) grids, requiring row virtualisation to preserve stable behaviour. This feature effectively makes it impossible to reliably implement a deep hierarchy, as far as I can see. It looks as though, when row virtualisation is turned on on the parent, it fails to refresh the vertical scrollbar when the child grid is expanded. If there is an event trap I can put in to force the issue that would be much appreciated. Note that I am not prepared either a) to put pagination in the child grid or b) put scrolling, as it messes up the child geometry (pushing all the columns over). As I say, if you turn off virtualisation, it works ok, until the row number becomes large, at which point the whole thing starts to become unstable (load failures or very long load times).

At the very least, if you can give me a script to turn on the parent scrollbar on detail expand, that would do for now.

Thanks,
George

Daniel
Telerik team
 answered on 02 Jul 2013
5 answers
386 views
Hi, I'm trying to implement a grid hierarchy with batch operations and the child grid Add New Record is not displaying.  All other operations (update, destroy, read) are working in the child grid.  The parent grid Add New Record does display and works fine, any help is much appreciated.  Here's my code:


// Grid contents
$(document).ready(function () {
var crudServiceBaseUrl = "http://localhost:8080/task-scheduler",
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl + "/retrieve/tasks",
type: "GET",
dataType: "json"
},
update: {
url: crudServiceBaseUrl + "/update/task",
type: "PUT",
dataType: "json",
contentType: "application/json"
},
destroy: {
url: crudServiceBaseUrl + "/remove/task",
type: "DELETE",
dataType: "json",
contentType: "application/json"
},
create: {
url: crudServiceBaseUrl + "/create/task",
type: "POST",
dataType: "json",
contentType: "application/json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
var json = kendo.stringify(options.models);
console.log("JSON Task to Server:", json);
return json;
}
}
},
batch: true,
pageSize: 5,
schema: {
model: {
id: "id",
fields: {
id: { type: "number", editable: false },
name: { type: "string", defaultValue: "Task " },
description: { type: "string", validation: { required: true } },
datatype: { type: "string" },
destination: { type: "string" }
}
}
}
});

$("#tasklist").kendoGrid({
dataSource: dataSource,
pageable: true,
filterable: true,
navigatable: true,
resizable: true,
selectable: "row",
height: 400,
detailInit: detailInit,
dataBound: function() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
},
toolbar: [{ name: "create", text: "Create Task" }],
columns: [
//{ field: "id", title: "ID", width: "60px" },
{ field: "name", title: "Name", width: "120px" },
{ field: "description", title:"Description", width: "150px" },
{ field: "datatype", title:"Datatype", width: "100px", editor: datatypeDropDownEditor },
{ field: "destination", title:"Destination", width: "100px", editor: destinationDropDownEditor },
{ command: ["edit", "destroy"], title: "Option", width: "160px" }],
editable: "inline"
});

var datatypeItems = [ { datatypeId: 0, datatypeName: "entity" },
{ datatypeId: 1, datatypeName: "event" },
{ datatypeId: 2, datatypeName: "metric" },
];

function datatypeDropDownEditor(container, options) {
$('<input required data-text-field="datatypeName" data-value-field="datatypeName" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataSource: datatypeItems,
dataTextField: "datatypeName",
dataValueField: "datatypeId",
optionLabel: "simple/entity",
change: function () {
dataItem = this.dataItem(this.selectedIndex);
options.model.datatypeId = dataItem.id;
}

});
}

var destinationItems = [ { destinationId: 0, destinationName: "resource" },
{ destinationId: 1, destinationName: "reference" },
{ destinationId: 2, destinationName: "correlate" }
];

function destinationDropDownEditor(container, options) {
$('<input required data-text-field="destinationName" data-value-field="destinationName" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataSource: destinationItems,
dataTextField: "destinationName",
dataValueField: "destinationId",
optionLabel: "resource",
change: function () {
dataItem = this.dataItem(this.selectedIndex);
options.model.destinationId = dataItem.id;
}

});
}

function detailInit(e) {
incrementId();
var crudServiceBaseUrl = "http://localhost:8080/task-scheduler",
datasource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl + "/retrieve/tasks",
type: "GET",
dataType: "json"
},
update: {
url: crudServiceBaseUrl + "/update/schedule",
type: "PUT",
dataType: "json",
contentType: "application/json"
},
destroy: {
url: crudServiceBaseUrl + "/remove/schedule",
type: "DELETE",
dataType: "json",
contentType: "application/json"
},
create: {
url: crudServiceBaseUrl + "/create/schedule",
type: "POST",
dataType: "json",
contentType: "application/json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
var json = kendo.stringify(options.models);
console.log("JSON Schedule to Server:", json);
return json;
}
}

},
batch: true,
pageSize: 5,
schema: {
model: {
id: "id",
schedules: {
fields: {
//id: { type: "number", editable: false },
startDateTime: { type: "date" },
endDateTime: { type: "date" },
interval: { type: "string", validation: { required: true }},
event: { type: "string", validation: { required: true }},
status: { type: "string", editable: false }
}
}
}
},
filter: { field: "id", operator: "eq", value: e.data.id }
});

$("<div id='" + id + "'/>").appendTo(e.detailCell).kendoGrid({
dataSource: datasource,
height: 250,
pageable: true,
//filterable: true,
navigatable: true,
resizable: true,
selectable: "row",
toolbar: [{ name: "create", text: "Create Schedule" }],
columns: [
{ field: "schedules[0].startDateTime", title:"Start Date", width: "120px" },
{ field: "schedules[0].endDateTime", title:"End Date", width: "120px" },
{ field: "schedules[0].interval", title: "Interval", width: "120px" },
{ field: "schedules[0].event", title: "Event", width: "120px" },
{ field: "schedules[0].status", title: "Status", width: "120px" },
{ command: ["edit", "destroy"], title: "&nbsp;", width: "160px" }],
editable: "inline"
});
}

var id=0;
function incrementId () {
id += 1;
console.log("Id:", id);
}

});
Vladimir Iliev
Telerik team
 answered on 02 Jul 2013
3 answers
90 views
Hi there,

I've created a TreeView with checkboxes and CheckChildren set to true. When I check one of the higher level nodes (with around 100 children total) it takes several seconds to check them. Am I doing something wrong or is the JavaScript for this not very performant? I've managed to replicate the problem by simply increasing the number of nodes in the demo cshtml. A very simple jQuery command to check all of the checkboxes is lightning fast, so it doesn't look like a browser performance issue.

Many thanks,
Chris
Chris
Top achievements
Rank 1
 answered on 02 Jul 2013
1 answer
148 views
Hi,

This looks like a bug in Kendo UI Grid. Please try the following:

a) On the hierarchy example, turn off paging and turn on scrolling, but set the Employees grid to be scrollable. The scroll bar will then correctly take account of the child (orders) grid.

b) Now set .Scrollable(scrollable => scrollable.Virtual(true)) in the parent grid. The vertical scroll bar is no longer active, making scrolling in the child grid impossible.
Please advise,

George
Daniel
Telerik team
 answered on 02 Jul 2013
1 answer
146 views
When I add the className property to a command in a grid I no longer receive the confirmation dialog. It seems the clicking is broken.

Here is the jsBin

Jon

Update:
The class on the anchor tag that received the className is "k-button k-button-icontext unassign k-grid-destroy k-grid-destroy"
The class on the anchor tag without the className is "k-button k-button-icontext k-grid-delete".

Why did k-grid-delete change to k-grid-destroy?

I'm using IE9 on Win7.
Vladimir Iliev
Telerik team
 answered on 02 Jul 2013
2 answers
102 views
Does the Kendo UI team plan on adding support for more of the Android Holo theme, for example the Action Bar and the Navigation Drawer?  Also, any chance for a pre-build "Holo Light" theme?  Thanks.
Kamen Bundev
Telerik team
 answered on 02 Jul 2013
0 answers
92 views
Never mind.  Visual Studio issue -- working outside of VS.
Tim R
Top achievements
Rank 1
 asked on 02 Jul 2013
1 answer
66 views
Hi,
I'm wondering if there are any examples or documentation for the events for the range input control for mobile.  I want to be able to update a label that shows the current value of the range control as it is slid, but a lot of googling later I only seem to find articles about the desktop kendo controls.

What events are fired by the control?
What are are the properties of the event parameter they generate?

Thanks
Kiril Nikolov
Telerik team
 answered on 02 Jul 2013
4 answers
349 views
I have a need to allow the user to chose what action to take when a concurrency error occurs, I'm wondering how exactly I'd bind a RowVersion column to the Grid popup editor so it posts the timestamp back to my MVC action method? I was hoping I'd be able to simply designate it as a string in the data source model schema but I'm getting the error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Has anyone else run into this issue? How did you resolve it? I'm guessing that javascript appends a "\0" when it converts the byte array to a string, so I (think) the work-around is to strip off the terminator character and convert the string back to a byte array in the grids...Save event?
Daniel
Telerik team
 answered on 02 Jul 2013
1 answer
121 views
Hello, 

I'm new in KendoUI and I have one small question. 
Is there any way to get Url paramters from Grid paramters? What I need to do is to catch each user action on a KendoUI Grid (actions like sorting, grouping and filtering) and replace the current page Url without refreshing. In this case, users can then easily share their views.

Can you please let me know if you have any recommandation, or native feature to help me doing that. 

Thanks & regards. 


Daniel
Telerik team
 answered on 02 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?