Skip to main content
krishnav9816
August 9, 2022
Question

how to delete a entire row in readOnly grid?

  • August 9, 2022
  • 13 replies
  • 0 views

how to delete a entire row in readonly grid?

    13 replies

    August 9, 2022

    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.

    krishnav9816
    August 9, 2022

    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)),

                          )

                      )

                    ),

                    ),

    harshitb6843
    August 9, 2022

    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.