I have an issue with restoring the selection in a Kendo dropdownlist after my application loads data from the database. When I set a breakpoint after restoring the selection, I can see that the dropdownlist has been set properly to the value to restore. However, when I continue after the breakpoint, the dropdownlist resets to its default value. What is causing the dropdown to reset?
We are using Kendo UI v2016.1.322, Internet Explorer 11.0.9600.18314, and Windows Server 2008 R2 Enterprise.
This is the markup for the dropdownlist :
<div class="panel panel-default" id="carEntriesPanel"
ng-repeat="carEntry in carEntries[selectedRouteIndex]">
<select class="form-control" kendo-drop-down-list k-options="kdCarTextOptions"
id="{{'carTextDropdown-' + $index}}" ng-model="carEntry.carTextSelected.id"
</select>
</div>
These are the options and data source:
$scope.kdCarTextOptions = {
optionLabel: 'Please Select',
dataSource: $scope.carTextDropDownDataSource,
dataTextField: 'name',
dataValueField: 'id',
select: $scope.onSelect
};
$scope.carTextDropDownDataSource = new kendo.data.DataSource({
transport: {
read: function (options) {
options.success($scope.carTexts[$scope.selectedRouteIndex]);
}
}
This is the onSelect method:
$scope.onSelect = function (e) {
var dataItem = this.dataItem(e.item);
$scope.carEntries[$scope.selectedRouteIndex][$scope.carIndex].carTextSelected.id = dataItem.id;
$scope.carEntries[$scope.selectedRouteIndex][$scope.carIndex].carTextSelected.name = dataItem.name;
};
}
This is the method that restores the dropdown selection. By setting breakpoints, I could see that the dropdownlist does show the restored value, and onSelect is called after the select is triggered. But when I continue after the trigger, the dropdownlist resets to its default value.
function updateCarTextDropdown(carIndex, carEntry) {
var dropdown = angular.element('#carTextDropdown-' + carIndex).data('kendoDropDownList');
if (dropdown) {
dropdown.dataSource.read();
if (carEntry.car.CAR_TXT_ID !== undefined) {
dropdown.value(carEntry.car.CAR_TXT_ID.toString());
dropdown.trigger('select');
}
}
Hi,
I am using grid with server side pagination/filtering & column checkbox. Lets say, I have specified page size = 25. My requirement is if user has applied some filter and total records are less than 500, then user should be able to Check All records across multiple pages. Right now, Check All selects only current page records.
Alternative could be, If I can dynamically change the page size to ALL, that should also solve this.
Regards,
Sanjay

Hi, I would like to do a "Top 4" ordered Bar Chart but I cannot sort the grouped value results and include only the best 4 values
(I do not sum values but I just count the items in each group)
see the Dojo Code
I am trying to load remote HierarchicalDataSource to Kendo-UI TreeList with loadOnDemand. I see that the data function is called with the response that consists the first element . But the data is not displayed in the TreeList, instead the message 'No records to display' appears.
Also have notice that the function hasChildren is not called. (BTW: this code works with TreeView)
Please advice.
I created a stacked chart on "Component" with a sort on the "Code" column. With the stacked column the chart sorts correctly on Code with 11 coming before 54. But when I switch to the stacked/grouping mechanism on Component the sorting switches to 54 and then 11. It might be due to something else but all I can think of is the stacked variable took over the sorting. My example is located at http://dojo.telerik.com/@dhighfield/EfuVA/3. I am expecting the Code 11 to always come before 54 since I have sorting set to Code.
Thank you for your time and assistance as always.
I cloned you example page here.
http://dojo.telerik.com/@cchu/ONOZi
Is there any why I can disable or enable that create button and those Edit and Delete ones by some condition? Maybe a Boolean value defined somewhere in View Model.
if that value changes it's able to refresh the status of those buttons.
I'm trying to figure out how to retain the aspect ratio of image elements that are resized.
In principle it seems like this can be handled by setting the SVG image element's preserveAspectRatio property to "xMidYMid meet" or the like.
I cant figure how to apply this property in the template (which would be the ideal place to apply it).
I've tried manually applying the property after the itemboundschange but this doesnt seem to work until the diagram is reinitialized after a page refresh.
Any suggestions?
