How to configure custom validations, enable a readonly filed while editing in Grid plus component?

Certified Associate Developer

I am building POC using a grid plus component, i need help solving below two issues

1. when i try to add custom validations like preparerDueDate<RevieweDueDate it does not validate properly. Even if one row has the validation to true, the message shows on all row for that field.

2. I have a column that cannot be edited when once added, when creating a new record i need the column to be editable. how can i achieve this functionality?

Thanks in Advance.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    Hi  ,

    I'm not sure this would work or not on Grid Plus 
    but instead of using  this as validation message " fv!row.preparerDueDate < fv!row.reviewerDueDate "
    we can utilise using the index when we are storing the values or implementations 
     local!records[fv!index].preparerDueDate 


    For the 2nd point, if existing records already have a primary key:

    readOnly: not(isnull(fv!row.id))

    Meaning:

    • New row → id = null → Editable
    • Existing row → id has value → Read Only

    This is probably the simplest solution since IDs are assigned only after creation.

Reply
  • 0
    Certified Associate Developer

    Hi  ,

    I'm not sure this would work or not on Grid Plus 
    but instead of using  this as validation message " fv!row.preparerDueDate < fv!row.reviewerDueDate "
    we can utilise using the index when we are storing the values or implementations 
     local!records[fv!index].preparerDueDate 


    For the 2nd point, if existing records already have a primary key:

    readOnly: not(isnull(fv!row.id))

    Meaning:

    • New row → id = null → Editable
    • Existing row → id has value → Read Only

    This is probably the simplest solution since IDs are assigned only after creation.

Children
No Data