{ width: 30, field: "Price", format: "{0:c}", attributes: { spinners: false } },
and this: { width: 30, field: "Price", format: "{0:c}", spinners:false },
Hello Kendo team,
I have a AngularJs Grid with scrollable set to { virtual: true } inside a TabStrip tab. This tab is not the selected tab, but the grid loaded in the background tab anyhow. When I switch to the tab containing grid, the scrolling is broken. If I hide (ng-if="false") the grid, and reload it again while I have this grid tab selected, the grid works fine. See plunk for demo of the problem.
Instruction for reproduce:
1. Select "Virtualized locked Grid" tab and try to scroll. Cannot, the scrolling is broken.
2. Without leaving this tab, click on the "Hide / Show Grids" button to remove the grid, and click again to reload the grid. Try scrolling, the scrolling works!
3. Select "Simply Locked Grid" tab and try to scroll. Scrolling works fine.
4. Select "Simply Virtualized Grid" tab and try scroll. Cannot, scrolling is broken like the "Virtualized locked Grid" tab.
5. Try step #2 on the "Simply Virtualized Grid" tab, and the scrolling works again.
It seems grid with scrollable set to { virtual: true }, with or without locked columns have scrolling problems when loaded inside a tab when the tab is not actively selected.
Help! Will you guys fix this as a bug, or do you have any suggestions to combat this problem meanwhile? (I know I can refresh the widget on activation event, but that's hell of annoyance. The whole reason we ditched our self made tab directive was to avoid complicated refresh widget dance on tab selection. )
Best,
Ama
How do I make the multi select default to the first value if there is only one row in the datasource view when the datasource is filtered
In angular i have tried many things, last thing I tried was a watch. Here is code that is not working where ddlRegion is my angular multiselect
$scope.$watch("dsRegions.view().length",
function handledsRegionsChange(newValue, oldValue) {
values = [];
if (($scope.dsRegions.view().length == 1) && ($scope.selectedRegion == null)) {
values[0] = $scope.dsRegions.view()[0].RegionId.toString()
$scope.selectedRegion = $scope.dsRegions.view()[0].RegionId;
$scope.ddlRegion.value(values);
}
}
);
Hi,
I am using kendo treeview with checkboxes in ASP .Net MVC. The datasource for the treeview is a list of item and want some of them to be selected on loading the treeview and then I want to pass the newly selected items to the controller. I can achieve each one of the two separately(with a line of code for each functionality), but they seem to be mutually exclusive.
This is my code for the view:
@(Html.Kendo().TreeView()
.Name("PrescriptionProductInstructions")
.DataTextField("Name")
.Checkboxes(x => x.CheckChildren(true))
.CheckboxTemplate("<input type='checkbox' name='checkedFiles[#= item.id #]' value='#= item.id #' #if(item.IsChecked){# checked #}#/>")
.Events(events => events.DataBound("onDataBound"))
.Checkboxes(x => x.Name("PrescriptionProductInstructions"))
.DataSource(source => source.Read(read => read.Action("GetInstructions", "Note", new { productId = Model.ProductId, personId = Model.PersonId }))))
<script>
function onDataBound() {
$("#PrescriptionProductInstructions").data("kendoTreeView").expand(".k-item");
}
</script>
The first bold line of code helps me pre-select some item when loading the tree and the second line of code helps me pass the list of ids of the selected items.
My question is whether I can have both functionalities as the same time? If yes, how?
Thanks in advance.
Regards,
Dayana Hadzhipetrova
Hi,
With Kendo Scheduler in Day or Week view, moving some all day events causes "Uncaught TypeError: Cannot read property 'startOffset' of null".
Steps to reproduce:
1. Almost any Kendo demo. For example: http://demos.telerik.com/kendo-ui/scheduler/move-resize
2. In week view, move two events to "all day events" for the same day.
3. Refresh the page. With demo this occurs only after refresh as the events must come from API as all day events for the same day.
4. Start dragging the lower all day event..
This causes "Uncaught TypeError: Cannot read property 'startOffset' of null". Reason is that Kendo cannot find a slot for event. This is because the all day slot height is too low to cover more than one event (only reaches the top all day events).
BR,
Keijo
Hiya,
I was trying to disable a button inside a toolbar using the code below (code snippet from http://demos.telerik.com/kendo-ui/toolbar/api ):
$(".toggleRepeat").click(function() { var toolbar = $("#toolbar").data("kendoToolBar"), repeatButton = $("#repeat"), isDisabled = repeatButton.hasClass("k-state-disabled"); toolbar.enable(repeatButton, isDisabled);});After looking at the developer tools and inspecting the said button, I noticed it is not marked as aria-disabled. Is there a way to achieve this?
Kind regards, Byang
I need to create a list of menu items server side and then bind to the kendo menu, but I am unable to create items with child items.
View:
@model IEnumerable<MenuItem>@(Html.Kendo().Menu() .Name("Menu") .BindTo(Model))I was unable to find a way to make childOne and childTwo children of the parent menuItem and added to the allMenuItems list
The allMenuItems is what I am passing to the View
var parent = new MenuItem() {Text = "Parent"};var childOne = new MenuItem() { Text = "Child 1", ActionName = "Foo", ControllerName="Bar" };var childTwo = new MenuItem() { Text = "Child 2", ActionName = "Foo2", ControllerName = "Bar" };var allMenuItems = new List<MenuItem>();I need some sample code showing how to build this list server side.
Thank you.