how to delete a entire row in readOnly grid?

Certified Associate Developer

how to delete a entire row in readonly grid?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    For this, you can create an extra column in gridfield and in that create a icon and use dynamic link to remove the row from the variable and if you want to remove it from DB then use deletefromdatastoreentity as well along with remove function.

  • 0
    Certified Associate Developer
    in reply to Deepak gupta

    please check code once,please verify index position

    a!gridColumn(

                      label: "",

                      value: a!richTextDisplayField(

                        value: a!richTextIcon(

                          icon:"trash-o",

                          link:a!dynamicLink(

                            value: 'type!{urn:com:appian:types:HR}hrcandidatedetails'(),

                            saveInto:a!save(ri!hrcandidatedetails,remove(ri!hrcandidatedetails,fv!row)),

                          )

                      )

                    ),

                    ),

  • 0
    Certified Lead Developer
    in reply to krishnav9816

    Remove works with the index and not the item. You will have to use the identifier (if the data is not DB backed) and wherecontains() if the data is DB backed in the second parameter of the remove() function. 

Reply Children