Hi,
A small problem I encountered when I switch to OData-v4 with scheduler.
I try to filter only the events that are visible in the scheduler control.
I Looks like to me that the parameterMap function is incorrect if the datasource is of type "odata-v4".
Found something like this kendo.data.transports.odata.parameterMap(options, type), but I'm still don't know how to add extra
filters. See code example for what I try to accomplish.
var schedulerDs = new kendo.data.SchedulerDataSource({ type: "odata-v4", serverFiltering: true, transport: { read: { url: function() { return "../odata/SchedulerEvents"; }, dataType: "json" }, parameterMap: function (options, operation) { if (operation === "read") { var result = { start: scope.schedularVar.view().startDate(), end: scope.schedularVar.view().endDate() } return kendo.stringify(result); } return kendo.stringify(options); } }
Hello,
I have got the problem that a kendo toolbar with many icons does not populate an overflowmenu on iPhone6 (iOS 9) with Safari until I change the orientation at least once. I tried to trigger a refresh by calling .resize(true) but it didn't help. Also ._toggleOverflow() shows only an empty list.
If I shrink my page on a desktop-browser everything works as expected.
Can you give me any hint?
Best regards
Marc
My View
---------------------------------
@using FOS.WC3.WebUILayer.ViewModels;
@{
ViewBag.Title = "ViewLinkedProcessingClients";
Layout = "~/Views/Shared/DefaultLayout.cshtml";
}
<div id="linkedProcessingClientGrid"></div>
@{
var gridName = "FSN_GRLP02";
var viewName = "FSN_GRLP02";
var componentParam = "&@AID=212";
var gridModel = new GridModel
{
GridName = gridName,
ViewName = viewName,
ComponentParam = componentParam
};
@Html.Partial("~/Views/Shared/GridView.cshtml", gridModel);
}
My Partial View
---------------------------
@using FOS.WC3.Framework.Common
@model FOS.WC3.WebUILayer.ViewModels.GridModel
<script src="@Url.Content("~/Scripts/FOS/Common/Grid/FOSKendoGrid.js")"></script>
<body>
<div>
<div id="GridContainer_@(@Model.GridName + "_" +Model.ViewName)"></div>
</div>
</body>
<script>
var gridName = '@Model.GridName';
var viewName = '@Model.ViewName';
var configUrl = '@Url.Action("GetGridConfig", "Grid")' + "?gridName=" + gridName + "&viewName=" + viewName;
var customParam = '@Html.Raw(Model.ComponentParam)';
var initCallBack = '@Model.InitCallBack';
var gridReadUrl = '@Url.Action("GetGridData", "Grid")' + "?gridName=" + gridName + "&viewName=" + viewName + customParam;
var kendoGrid;
$(document).ready(function () {
var successCallback = function (data) {
if (typeof data.Result != 'undefined') {
if (typeof data.Result.columns != 'undefined') {
var model = {};
var gridId = "GridContainer_" + gridName + "_" + viewName;
var gridConfig = data.Result;
kendoGrid = FOSKendoGrid.Initialize(gridId, gridConfig, gridReadUrl, initCallBack);
}
}
};
var errorCallback = function (xhr) {
};
$.ajax({
url: configUrl,
dataType: "json",
success: successCallback,
error: errorCallback
});
});
</script>
My KendoGridJS
----------------------------------
var FOSKendoGrid = function () {
// var initialize = function (columnOptions, dataModel, readUrl) {
var initialize = function (gridId, gridConfig, gridReadUrl, initCallBack) {
var container = $('#' + gridId).html('<div></div>');
var grid = $('div', container);
var filterOption = {
extra: false,
operators: {
string: {
eq: "Is Equal To",
startswith: "Starts With",
contains: "Contains",
endswith: "Ends With"
}
}
};
//var vm = kendo.observable({
// nameTemplate: '<img src="Content/Images/3dots.png" />',
// buildGrid: buildGrid
//});
//function buildGrid() {
// if (vm.nameTemplate !== '') {
// gridConfig.columns[6].template = vm.nameTemplate;
// }
var gridOptions = {
dataSource: {
transport: {
read: {
url: gridReadUrl,
contentType: "application/json",
type: "GET"
}
},
schema: { data: "ComponentData", total: "Total", model: { id: "ID" } },
serverPaging: true,
serverSorting: gridConfig.sortable,
serverFiltering: false
},
//schema: dataModel,
columns:gridConfig.columns,
height: 300,
sortable: {
mode: "single",
allowUnsort: false
},
filterable: false,
pageable: {
pageSize: gridConfig.rowsperpage,
refresh: true,
messages: {
refresh: "Refresh the grid"
}
}
};
grid.kendoGrid(gridOptions);
if (initCallBack) {
initCallBack(grid);
}
return grid;
};
var refresh = function (gridId) {
var grid = $('#' + gridId + '>div');
if (grid.length < 1) {
return;
}
grid.data("kendoGrid").dataSource.read();
};
//var viewModel = function (gridId) {
// var grid = $('#' + gridId + '>div');
// kendo.observable({
// ordersSource: grid.data("kendoGrid").dataSource,
// selectedRow: null,
// change: function (eventArgs) {
// alert('sds');
// this.set("selectedRow", eventArgs.sender.dataItem(eventArgs.sender.select()));
// }
// });
// kendo.bind(grid, viewModel);
//}
return {
Initialize: initialize,
Refresh: refresh
};
}();
Here I have place the dynamic grid code. My issue is, I need event handler for this dynamic kendo grid. I need full controll for this dynamic kendo grid. For that my thinking is, I planned to pass javascript callback function to "Partial View". I dont want to create event in kendo.js.Since we are planning to make generic.So for this, we need to handle in partial view only.Please provide the solution for this.
​
Hello,
I have a question related to configuring a DOM by setting the Dropdown lists, Calendars, Grid, etc.. Once a DOM is configured, can I cache that DOM with all configurations so that next time I show/hide the DOM I don't need to do again those configurations (configure Dropdown list, Grid, etc.)
The reason is that I have a long form and causing some delays every time I need to show/hide while configuring the datasources and controls.
Thank you,
Bilal
I've setup a grid with inline editing, and have the following for transport code. (Using local data). Why would the create event fire when I click the update button instead of the update event?
It may also help me if someone could explain what happens when the edit button is clicked in regards to what events are fired, etc.
"columnData" is a local dataset, and in reality I don't think I need the create as I don't have any functionality to add rows. This is just a simple editable grid where a user is allowed to edit 3 out of 4 columns with the first column being read only.
transport: { read: function(e) { e.success(columnData); }, update: function(e) { e.success(); }, create: function(e) { var item = e.columnData; item.Id = columnData.length + 1; e.success(item); }Using HTML_CodeSniffer, I'm getting lots of errors for the kendoNumericTextBox because there are text fields (input type=text) that do not have an associated label (using label for). The errors are (for each added textbox):
Note, NumericTextBox passes the 508, but fails at the next level, WCAG 2 A. We're targeting WCAG 2 AA, so this is clearly a fail for us.
I also tried against the demos and get the same error.
​How can I get Kendo to render in such a way as to pass WCAG?
​
Hi
Small error in the kendo ui documentation for the grid properties, see the attached image
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.filterable.cell.suggestionOperator
Cheers
Lynden Garrett
I am binding a function to the treeView's dataBound event. I'm using a hierarchical data source with a remote url (web api). I have found that the event fires once before any data is loaded, again when it is loaded, and again for each time I expand a node. I know lazy loading is enabled by default, but even so I can see in the network traffic that the entire hierarchical data items are loaded just once. I guess the tree re-binds at each node Expand. Then I disabled lazy loading, and now the event fires four times after loading the remote data! My tree has four top-level nodes, so perhaps once for each node?
I'd like a dataBound event that fires once and only once, after the data is all loaded.
version 2015.3.930
Thanks,
Randy