Adding new row under selected row

repeater-widget

#1

I wanted to allow user to select only one row of a repeater and if user add a new row it should be added under the selected row.

I have attached a sample RP file in which I have created a grid control using repeater, please check.

Please help me to achieve this.
Grid_Editable.rp (79.1 KB)


#2

Hi sreenivas,

After some tinkering around I was able to put together some interactions that I believe will do what you’re looking for.

First, when you click on your checkbox widget you’ll want to have it take the value of Line No., add 1 to it, and then store that number in a global variable:

Next, you’ll want to go over to your + button and add an action that updates all of the rows in the repeater where the value of Line No. is greater than the value of Line No. in the row that you clicked (so your global variable -1).

Next, add a row to the repeater that uses the global variable for the Line No. column.

Once the above two are set up, add an action that sorts the Line No. column as numbers in ascending order.

The above should let you select a row and then add a new row below it, and will keep the rows in ascending order. Hopefully this helps!
Grid_Editable Edit.rp (127 KB)


Parent and child tree with repeaters
#3

Thanks Alyssa ,

That’ s what I am looking for :slight_smile:


closed #4

unlisted #5