Completed
Last Updated: 28 Nov 2024 07:56 by ADMIN
Johann
Created on: 15 Nov 2021 07:24
Category: Grid
Type: Feature Request
1
disableSelection callback for Grid checkboxes

Could we have a turnkey solution which allows to disable a row selection which takes care of disabling only the relevant selection checkboxes and handle properly the "Select all" checkbox state (in header).

With CheckboxColumnComponent field which allows providing dataItem field name or predicate function.

<kendo-grid-checkbox-column showSelectAll="true" disableSelection="isDisabled">
</kendo-grid-checkbox-column>

<kendo-grid-checkbox-column showSelectAll="true" [disableSelection]="isDisabledPredicateFunction">
</kendo-grid-checkbox-column>

OR

If you don't want to add more selection concerns into CheckboxColumnComponent this field could be specified in your SelectableSettings as well:

public selectableSettngs: SelectableSettings = {
    enabled: true,
    checkboxOnly: false,
    mode: 'multiple',
    cell: false,
    drag: false,
    rowEnabled: mySelectableRowPredicateFunction
}

rowEnabled field could something like this:

export declare type RowEnabledSelectionFn = (context: RowArgs) => boolean | boolean;

export interface SelectableSettings {
    //...
    /**
     * Determines if row selection is allowed.
     *
     * @default true
     */
    rowEnabled?: RowEnabledSelectionFn;
}

Thank you

1 comment
ADMIN
Slavena
Posted on: 28 Nov 2024 07:56

Hi,

We are happy to announce that this feature was implemented in v16.11.0. Please refer to the following article for more details:

https://www.telerik.com/kendo-angular-ui/components/grid/selection/row-selection#disabling-the-selection-for-specific-rows

Regards,
Slavena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.