Hi.
I need to customize clasicall colum menu of grid. Insted of him i need to show his "Filter" - submenu.. But only on some columns. I solved this by cobe below:
function columnMenuInit(e, data) {
var self = this;
var field = e.field;
var gridId = "GridODU";
self.tr = this.thead.find("[data-field=" + e.field + "]");
if (field !== "Id" && field !== "id" && field !== "DruhPrijmu_Code" && field !== "ZuctovaciSymbol_Code") {
var menu = e.container.children().data("kendoMenu");
var filterMenuOptions = self.tr.data("kendoColumnMenu").filterMenu.options;
var menuParentWrapper = menu.wrapper;
menuParentWrapper.removeAttr('class');
menuParentWrapper.attr('class', 'k-reset');
menuParentWrapper.html("");
menuParentWrapper.append("<
li
class
=
'customMenu'
></
li
>");
if (filterMenuOptions.name == "FilterMultiCheck") {
menu.wrapper.find(".customMenu").kendoFilterMultiCheck(filterMenuOptions);;
} else {
menu.wrapper.find(".customMenu").kendoFilterMenu(filterMenuOptions);;
}
}
}
This solution works like I expected, but there is problem with doubled request to server for column fiter data. First request is made before columMenuInit event (thid fill with data filter submenu) and inicialization of kendoFilterMenu / kendoFilterMultiCheck in columMenuInit event cause second request.
Is there some way how to do only one request ? Or is there any other solution how to achieve desired behaviour ?
Thanks!
if I specify an angular directive in the shape template, it gets lost from the rendered SVG. For example, I have a html template for shape like this:
<script id="template" type="text/x-kendo-template">
<div
ng-model="eBDiagram.task"></div>
</script>
in shapeDefaults.visual:
visualShapeTemplate = options => {
// Render template and bind it to the current data item
var dataItem = options.dataItem.content;
var renderElement = $('<div />').appendTo('body');
// Import the Drawing API namespaces
var draw = kendo.drawing;
// Compile the shape template
var contentTemplate = kendo.template($('#template').html());
renderElement.html(contentTemplate(dataItem));
// Create a new group that will hold the rendered content
var output = new kendo.drawing.Group();
draw.drawDOM(renderElement, null)
.then(group => {
output.append(group);
/* Clean-up */
renderElement.remove();
});
var visual = new kendo.dataviz.diagram.Group();
visual.drawingElement.append(output);
return visual;
}
but data isn't bound through 'ng-model' in the resulting SVG. I even tried explicitly to link the scope variable with the template, but no data
appeared in the resulting SVG:
if (renderElement) {
.$compile(renderElement)($scope);
}
Is there a way (like Excel does) to show summary stats when users select multiple cells? Excel shows count & sum at the bottom of the sheet on the right hand side.
Thanks!
I have downloaded the new Kendo version 2017.1.223. I am using all components, and using the default Kendo styles by including kendo.default.min.css. I know that the icons changed in 2017, but there seems to be a problem related to classes that are generated by the Kendo grid.
With the new Kendo version, the column settings icons in the column headers are 3 vertical dots instead of a caret. When I inspect a column header element, I see that the span is using class 'k-icon k-i-more-vertical'. Our production site still has the previous Kendo version, and inspecting the column header element shows that the span is using class 'k-icon k-i-arrowhead-s'.
I have attached screenshots to illustrate the problem. Please advise how to fix this so that the column headers contain caret icons instead of 3 vertical dots.
How can I format multiple sort query string parameters so that a WebAPI method expecting a DataSourceRequest (WebApiDataSourceRequestModelBinder) will parse correctly?
A query string such as
?page=1&pageSize=10&sort=foo-asc
works fine for paging and single column sort. What should the query string parameters look like for multiple column sort?
Hello! I'm using KendoUI with ASP.NET MVC (IIS Web Server), I would like that kendo.all.min.js (size 2.8M) could be cached by browser (Chrome basically). I've noticed that with no secure protocolo (HTTP) this happens if I include in _Layout.cshtml the library like this:
<script src="@Url.Content("~/Scripts/kendo/kendo.all.min.js")"></script> or <script src="~/Scripts/kendo/kendo.all.min.js"></script>
but if I use HTTPS the library will be partially cached (816KB) or not at all as you can see from attached image.
I've tried also using ASP.NET Bundles with no solution.
I've noticed that if I link the library from your CDN like this:
<script src="//kendo.cdn.telerik.com/2016.3.914/js/kendo.all.min.js"></script>
it's cached also with HTTPS, but this can't be a solution because I can't assume that our customers have a global internet connection always available (welcome to Italy in 2016 -_-").
Any suggestions to solve this issue?
Thank you!
Hi,
I have a datasource attached to a Kendo spreadsheet with AngularJS.
In the onchange method of the spreadsheet, we iterate datasource.data() to see which records are changed. I then use a webservice (not the transport layer of the datasource) to validate the changes.
The user can then choose to press a save button, which will use a webservice (not the transport layer) to save the records. However, after the datasource has iterated the data to run the validation specified above, all the records dirty flags are set back to false. I have tried in this same loop the following, to reset the dirty flag but it doesn't seem to work.
datasource.data()[i].dirty = true;
Thanks
Marc
I have a number 67.75, with the format mask "###,###,##0.00%". I would expect 67.75%, however I am getting 6775.00%
I have the mask because I need comma's for thousand separator, and always 2 decimal places with the percentage sign.
Why isn't this working?
@(Html.Kendo().Grid(Model.Items)
.Name("PlacesGrid")
.ToolBar(commands => commands.Create())
.DataSource(dataBinding =>
{
dataBinding.Server().Model(mod => mod.Id(x => x.ID))
.Create("Insert", "Place")
.Update("Update", "Place")
.Destroy("Delete", "Place");
})
.Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.PopUp))
.Columns(columns =>
{
columns.Bound(x => x.Name).Title(Resources.Resource.PlaceName);
columns.Bound(x => x.IsPublished).Title(Resources.Resource.IsPublished)
.HeaderHtmlAttributes(new { @class = "center" })
.HtmlAttributes(new { @class = "center" });
columns.Bound(x => x.WebserviceUrl).Title(Resources.Resource.WebserviceUrl);
columns.Bound(x => x.CreateDate).Title(Resources.Resource.CreateDate).Format("{0:g}")
.HeaderHtmlAttributes(new { @class = "right" })
.HtmlAttributes(new { @class = "right" });
columns.Command(commands =>
{
commands.Edit();
commands.Destroy();
}).Width(200).Title("").HtmlAttributes(new { @style = "text-align:right" });
})
)