We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Angularjs - Setting SelectedIndex does not work

We have an angular ej-listbox but since upgrading to, and changing selectedItemIndex to selectedIndex (in fact neither of these work) we cannot get our listbox to show with a selected value.

I have tried with a very simple example and that does not work either

<span class="sampleName">Listbox / AngularSupport</span>
<div ng-app="syncApp">
    <div ng-controller="ListboxCtrl">
        <ul ej-listbox e-datasource="options" e-width="100%" e-fields-id="Id" e-fields-text="Name" e-selectedindex="optionIndex"></ul>
        <script type="text/javascript">
            angular.module('syncApp', ['ejangular'])
                .controller('ListboxCtrl', function ($scope) {
                    $scope.optionIndex = 2;
                    $scope.options = [{ Id: "1", Name: "All" }, { Id: "2", Name: "Audi" }, { Id: "3", Name: "BMW" }, { Id: "4", Name: "Mercedes" }];

Cheers ... Rob.

1 Reply

SS Selvamani Sankarappan Syncfusion Team November 17, 2015 11:06 AM UTC

Hi Rob

Sorry for the inconvenience caused,

We have analyzed your query and able to reproduce the reported issue in our end. We have considered this “cannot get our listbox to show with a selected value“as a defect and logged an issue report on this.

A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.



Selvamani S

Live Chat Icon For mobile
Up arrow icon