Hoe can we prevent from selecting first item of wijmo list box

Posted by: fullah on 2 November 2017, 12:30 am EST

  • Posted 2 November 2017, 12:30 am EST

    Hi,

    Wijmo list box by default selected it's first item. How can we prevent it from selection.
    <wj-list-box style="height: 230px; width:332px; margin-left: -17px; padding:10px; cursor:pointer"
    is-content-html=true
    control="companyGrp"
    item-Formatter=CompanyGroupFormatter
    items-source="compGroups"
    display-member-path="Name"
    selected-value-path="GroupId"
    selected-value="selectedGroupId"
    selected-item=null
    selected-index-changed="CompanyGroup(s, e)">
    </wj-list-box>


    Selected-item is not working in my case. This "compGroups" collection contains data for listbox. How can we prevent it from selection through programmatically?

    Thanks
  • Replied 14 November 2017, 8:51 pm EST

    Hi,
    You can set currentItem to null for CollectionView.

    $scope.companyGrp.collectionView.currentItem=null;


    ~Manish
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels