Editor delete & edit conditions

Editor delete & edit conditions

Restful Web ServicesRestful Web Services Posts: 202Questions: 49Answers: 2

I believe it would be useful to easily allow both the remove & edit buttons to have conditions applied to their action on a per row or rows basis in a similar way to how validation currently occurs.

For example,

                    extend : "remove",
                    editor : editor,
                    buttonValidator( Validate::action(
                         ->validator( function ( $field, $val ) {
                            return strlen( $val ) > 50 ?
                            'Row Y cannot be removed when the value of column X is greater than 50' :
                            true;
                        });
                    ));

If any of the selected rows fails the validation then a notification is displayed to the user and the default action is suppressed.

I know this can be done now but it would be nice to have a more robust method of implementing this kind of validation.

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    This thread which covers a similar topic might be of interest to you.

    Allan

This discussion has been closed.