Not able to add checkboxes in Listbox

Posted by: nivishapanwar on 5 March 2021, 2:34 am EST

  • Posted 5 March 2021, 2:34 am EST

    Hi,

    I am using wijmo listbox with typescript code. I tried to ways to add checkboxes but not able to add checkboxes.

    How can I add checkboxes in listbox.

    First way:

    <wj-list-box #ListData [itemsSource]=“name” (initialized)=“initListBox(ListData)” [checkedMemberPath]=“‘recordData’”

    (selectedIndexChanged)=“displayListBoxValueInTextField(ListData)”>



    {{item}}











    Second Way:

    private _showCheckboxes = false;

    get showCheckboxes() {

    // return this._showCheckboxes;

    // }

    // set showCheckboxes(value: boolean) {

    // if (this._showCheckboxes !== value) {

    // this._showCheckboxes = value;

    // this.ListData.checkedMemberPath = value ? ‘checked’ : ‘’;

    // }

    // }

    How can I add checkboxes.

    Thank you.

    Regards,

    Nivisha

  • Posted 8 March 2021, 12:18 am EST

    Hi Nivisha,

    I have replied to your query on the link below:

    https://www.grapecity.com/forums/wijmo/getting-error-cannot-read-

    For reference, I am copying the response here.

    The checkedMemberPath property is of ListBox and not of CollectionView. Your issue may be arising because you have added the wjItemTemplate directive which does not define any checkbox to display.

    I have updated the sample to fulfill your requirements:

    https://stackblitz.com/edit/angular-9-0-0-rc-1-nfjukl

    Regards,

    Ashwin

  • Posted 8 March 2021, 1:52 am EST

    Hi Ashwin,

    https://stackblitz.com/edit/angular-9-0-0-rc-1-nfjukl<br>

    Not able to open this link.

    Yes, I have added the wjItemTemplate directive for displaying my drag and drop icon. So , I can’t have checkboxes and that icon together?

    Regards,

    Nivisha

  • Posted 8 March 2021, 1:58 am EST

    Oh, sorry. Please try this link again:

    https://stackblitz.com/edit/angular-9-0-0-rc-1-nfjukl

    Yes, you can have the icon and checkbox as demonstrated in the sample.

Need extra support?

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

Learn More

Forum Channels