Hi,
We have a Use case like
Editable grid having 3 required fields of type like Name(text), Salary(float), commisstion(float),
Two Buttons of type Submit like AddEmployee and RemoveEmployee,(not inline add and delete buttons with editable grid)
Here are validations:
When we click on AddEmployee it should add new Row.
When we click on RemoveEmployee it should check whether the grid being selected at least one row. if not it should not submit and Validation message has to show.(its not inline Add or delete buttons)
We are facing the following challenges:
Case1:
Select at lease one row validation message is displaying when the form loading. this has to show only when the button RemoveEmployee click. how to stop this validation message on Form Load.
Case2:
Once I clicked on AddEmployee button new row being added with contains the required fields.
now when we clicked on RemoveEmployee Button its forcing us to enter the required fields. how to skip this required fields validations and validate only grid selected or not?
Discussion posts and replies are publicly visible
It sounds to me like the use of validation groups (example here). By adding a validation group to a field, that field will only validate if a button or link with the same validation group is pressed. By assigning the "RemoveEmployee" validation group to the validation in Case1, it won't trigger until that link is clicked. Likewise, the link will not validate the requiredness of the fields that do not have the "RemoveEmployee" validation group.