How to disable multi select inside flex grid column

Posted by: msingh on 14 December 2023, 10:10 pm EST

  • Posted 14 December 2023, 10:10 pm EST

    i have a wj-multi-select which is inside a wj-flex-grid column and i want it to be disable for some of the rows. how can i do this?

  • Posted 17 December 2023, 7:58 pm EST

    Hi,

    As per our understanding, you want to disable MultiSelect in some specific rows(based on condition), if so then you may pass the disabling condition to the isDisabled property of MultiSelect inside the template. Please refer to the code snippet and sample link below for reference:

     <wj-multi-select
            #multSelect
            [itemsSource]="getMultData(cell.item.id)"
            [(ngModel)]="cell.item.country"
            [(checkedItems)]="cell.item.country"
            [isRequired]="false"
            [isEditable]="false"
            [isDisabled]="cell.item.id % 2 == 0" //pass your disable condition here
            (isDroppedDownChanged)="isDroppedDownChanged(multiSelect, flexTemp)"
          ></wj-multi-select>

    sample link: https://stackblitz.com/edit/angular-mgqyjm?file=src%2Fapp%2Fapp.component.html

    In case you want to disable the entire row then you may handle formatItem event of FlexGrid and set the ‘.wj-state-disable’ class to all the cells in your desired specific rows.

    Regards

    Sonu Kumar Pandey

Need extra support?

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

Learn More

Forum Channels