How to create Editable grid with CDT columns along with non CDT column like some Boolean array.

Certified Senior Developer

Hi,

we have requirement like need to create Editable grid with CDT elements along with one non CDT element. 

Example like after all the CDT columns I want to append another column with Non CDT element like Boolean Array element.

Can you please provide some sample example will help us closing this requirement.

Example

 EMPID EMP Name AGE Eligible
 100  ABC 20

Checkbox

200 XYZ 30 Checkbox

here Eligible column is not part of Employee CDT. its Boolean Array. when he selects the Eligible checkbox we need to store the value in to that Array.

 

Thanks in Advance.

 

 

 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    Unlike gridField, in gridlayout it is not necessary for all elements to be displayed should be part of single cdt.
    In your main rule create a boolean array of same length as that of your CDT. Now pass both these to your grid row rule.

    Ex:
    load(
    local!boolArrayEligble: repeat(count(ri!cdtEmp), true/false ),
    apply(
    rule!GenerateGridRow(
    cdtEmp: ri!cdtEmp,
    boolEligble: local!boolArrayEligble,
    index: _
    ),
    {1,2,3,4,5}
    )
    )

    Hope this helps
Reply
  • 0
    Certified Senior Developer
    Unlike gridField, in gridlayout it is not necessary for all elements to be displayed should be part of single cdt.
    In your main rule create a boolean array of same length as that of your CDT. Now pass both these to your grid row rule.

    Ex:
    load(
    local!boolArrayEligble: repeat(count(ri!cdtEmp), true/false ),
    apply(
    rule!GenerateGridRow(
    cdtEmp: ri!cdtEmp,
    boolEligble: local!boolArrayEligble,
    index: _
    ),
    {1,2,3,4,5}
    )
    )

    Hope this helps
Children
No Data