Hi,
As the title says, Im trying to remove a row from my grid without it affecting the datasource. The reason for this is that I have a list of ACTIVE users and if one is updated to be INACTIVE I need to remove it from the grid.
Things I've tried in the dataSource requestEnd(), if the type is an update, and the response object is inactive:
1) Remove it from the datasource. This does not work, becuase the next DS sync thats run, calls the destroy method on the deactivated record
2) execute a filter() on the dataSource to only display ACTIVE users but I get a JavaScript error "Uncaught TypeError: Cannot read property 'status' of undefined" and it points to the lie where the filter is executed.
Any advice would be appreciated.
Thanks and Kind Regards,
Grant
I initialize a list view in the ini handler of a bootbox.dialog (http://bootboxjs.com/examples.html) from a button in a grid:
$("#listview").kendoListView({...
The content of the dataSource is different from each grid row.
This initialization happen every time the button is clicked.
Can/Should I initialize only once and just update the dataSource.
Thanks in advance
Regards
Morten
It works:
$(function() {
$("#dropdownlist").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: [
{ text: "Todos", value: 0 },
{ text: "Valor 1", value: 1 },
{ text: "Valor 2", value: 2 }
]
});
var valor = $("#dropdownlist").data("kendoDropDownList");
function loadGrid(){
$("#grid").kendoGrid({
dataSource:{
transport:{
read: {url:"http://localhost/php/lerdados.php", dataType:"json", data:{"Ordem": valor.value()}, type: "post"}
},
schema:{
type: "json",
data: "xData"
}
},
columns: [
{ field: "Ordem", title: "Ordem"},
{ field: "Data", title: "Data", width: "100px" },
{ field: "Total", title: "Total", format: "{0:c}", width: "100px" }
],
})};
$("#getValue").click(function() {
loadGrid();
});
});
when i declare datasource as variable doesn't work.
$(function() {
$("#dropdownlist").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: [
{ text: "Todos", value: 0 },
{ text: "Valor 1", value: 1 },
{ text: "Valor 2", value: 2 }
]
});
var valor = $("#dropdownlist").data("kendoDropDownList");
var mdataSource = new kendo.data.DataSource({
transport:{
read: {url:"http://localhost/php/lerdados.php", dataType:"json", data:{"Ordem": valor.value()}, type: "post"}
},
schema:{
type: "json",
data: "xData"
}
});
function loadGrid(){
$("#grid").kendoGrid({
dataSource: mdataSource,
columns: [
{ field: "Ordem", title: "Ordem"},
{ field: "Data", title: "Data", width: "100px" },
{ field: "Total", title: "Total", format: "{0:c}", width: "100px" }
],
})
};
$("#getValue").click(function() {
loadGrid();
});
});
Hi,
We upgraded our kendo ui version to v2018.1.117.
Since then, when the screen is smaller than 1024*768 resolution, the pager in the grid is shown as a dropDown control in vertical mode,
instead of horizontal - as it always was.
How can we remain the old behavior - that the pager of the grid will be shown horizontally?
Thanks,
Yael
The k-loading-mask div is now inside the k-content div.
This causes a few issues when it comes to the layout whilst loading.
- The grid is still scrollable
- The loading mask moves up and down whilst scrolling.
Please see the attached gif where i did the following to highlight the issue;
- Used chromes browser throttling mode to emulate a very slow network connection
- Added `background: red` to `.k-loading-mask`
In older versions the loading mask covered the entire grid div and prevent this issue from happening.
Example;
http://jsfiddle.net/dimodi/dYcHg/

We have a cell with validation (it is a dropdown type validation).
When the users copy the value from another cell to this cell, I used the clipboard.paste.prototype method to override the default behaivour and retain the pasteRef cells formatting (background, font colour, validation values etc), but after the paste, the cell may (or may not) be invalid.
Is there a way to then manually check the validation and if it fails, fire the validation fail event (which shows a popup)?
Thanks!
I have a grid that is attached to a datasource. When it reads data, the server responses with no-content (when there is no data in the database).
So the returned data is undefined. But the datasource is still trying to read the total which gives an exception.
This line throws the error in kendo.all.js file
total: function (data) {
return data.length;
},
I was under the impression that the dataSource ignores any further processing if it does not get any valid data form the server.
Hi,
I have a "table" and labels inside table's td.I applied kendoDraggable to all labels in tds. And the all tds also droppable. Briefly, i want to move elements (which insde table cell) to another cell.
Everything seems ok, i can drag and drop but when i drag element to not droppable area, element disappeared, not reverting with animation. And some laggy behaviour when dragging. Am i missing a point ?
Here is my implementation
$("#itemTable label.item-label").kendoDraggable({
hint: function (element) {
var clone = $(element).clone();
$(clone).css('border', "1px solid black");
$(clone).css('width', 'auto');
$(clone).css('background-color', '#ffffff');
return clone;
},
dragstart: draggableOnDragStart,
drag: draggableOnDrag,
dragend: draggableOnDragEnd,
dragcancel: draggableOnCancel
});
$("#itemTable tbody tr td").kendoDropTarget({
dragenter: droptargetOnDragEnter,
dragleave: droptargetOnDragLeave,
drop: droptargetOnDrop
});
function droptargetOnDrop(e) {
console.log("drop");
console.log(e);
$(e.draggable.currentTarget).appendTo($(e.dropTarget[0]));
}
Thanks