Question
How to force Add Item to add row at the end of the data grid
Hello,
I see that this question was addressed here:
https://pdn.pega.com/community/product-support/question/how-force-add-item-always-add-last-data-grid
however, I would like to be able to force a row to be added to the end of a grid rather than to a repeating dynamic layout, without having to specify a List and Detail Flow Action. I have a form with a lot of grids in it, and by specifying a List, I would have to create a separate instance of the Add Item action for each one - even if I do this, I'm not sure what to enter as a Detail Flow Action.
Would I need to Save As and rename my own version of the AppendToPageList activity and modify it in order to accomplish this for a grid?
Thanks,
David
Hi David,
Yes, I believe you will need to override or write your own activity. I imagine the approach might look something like this. Get a handle on the pagelist and then use the <APPEND> tag. Or get the length of the pagelist and insert at length+1. Something like that.
But I am thinking of another idea that I am not sure if it works or will work for you, but what if you disable row selection entirely. This way add a row has no other option, but to append at the bottom?