4 Answers, 1 is accepted
0
Hi Boris,
Currently, there is no angular solution for setting the width of the ComboBox Dropdown list. However, you can set it during the kendoWidgetCreated event using jQuery. You can see the implementation in this Kendo UI Dojo by Progress.
Here is the function:
Also, please check out our Kendo Feedback Portal to request new features.
Hope this helps!
Regards,
Patrick
Telerik
Currently, there is no angular solution for setting the width of the ComboBox Dropdown list. However, you can set it during the kendoWidgetCreated event using jQuery. You can see the implementation in this Kendo UI Dojo by Progress.
Here is the function:
$scope.$on("kendoWidgetCreated", function(event, widget) {
if (widget === $scope.localCombo){
widget.list.width(400);
}
if (widget === $scope.remoteCombo){
widget.list.width(200);
}
});
Also, please check out our Kendo Feedback Portal to request new features.
Hope this helps!
Regards,
Patrick
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Boris
Top achievements
Rank 1
answered on 15 Jun 2016, 01:56 PM
Unfortunately this did not work.
0

Boris
Top achievements
Rank 1
answered on 15 Jun 2016, 02:09 PM
The reason I think it's not working for me is because my comboboxes are inside an ng-repeat.
Is there a solution in this case?
0
Accepted
Hello Boris,
Here are a couple approaches you can use to set your Kendo ComboBoxes list widths.
1. Using widget.ns:
On the kendoWidgetCreated event, I checked the widget to see if it was a comboBox:
2. Using the object from ng-repeat:
On the kendoWidgetCreated event, I checked the item name from myObj used by ng-repeat:
Hope this helps!
Regards,
Patrick
Telerik
Here are a couple approaches you can use to set your Kendo ComboBoxes list widths.
1. Using widget.ns:
On the kendoWidgetCreated event, I checked the widget to see if it was a comboBox:
$scope.$on("kendoWidgetCreated", function(event, widget) {
if (widget.ns === ".kendoComboBox"){
widget.list.width(200);
}
});
2. Using the object from ng-repeat:
On the kendoWidgetCreated event, I checked the item name from myObj used by ng-repeat:
<
div
ng-repeat
=
"item in myObj"
>
...
</
div
>
<script>
...
$scope.myObj = [
{"name":"a"}, {"name":"b"}, {"name": "c"}
];
$scope.$on("kendoWidgetCreated", function(event, widget) {
if (widget.$angular_scope.item.name === "a"){
widget.list.width(200);
}
if (widget.$angular_scope.item.name === "b"){
widget.list.width(400);
}
if (widget.$angular_scope.item.name === "c"){
widget.list.width(600);
}
});
...
</script>
Hope this helps!
Regards,
Patrick
Telerik
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.