Oh! Somehow I missed that you were adding the “X” only to the first item in the group. Got it.
- Small Picture: (How to place interactions only in the cells that have the “X”)…
One way to do this would be to add a condition to the OnClick event that only deletes the row if the text on the widget = “X”.
Sample file:
RowAddDelete_SmallPicture.rp (58.8 KB)
- Medium Picture: (How to place a Trash can (or any other) icon in the cells that would have had an X)
Usually what I do is add something like a “type” column to my repeater, and I use that column to indicate which of the rows are the special rows. In this case, since it seems like the top row is some kind of header, I used the word “header”, but you can use anything you like.
Next step is to add the trash can icon to your repeater row and hide it. Move the OnClick event from the rectangle to the trash icon, which means that the “delete” action will only fire when the user clicks the trash. Then, in your repeater OnLoad event, you can add a condition that shows the trash can only for rows where type=“header”.
I went ahead and used the default icon that is included with Axure, but you can use this for any image or svg icon.
(I also removed the “X” from the Add Rows event, since the X is no longer needed.)
Sample file:
RowAddDelete_MediumPicture.rp (61.8 KB)
- Big Picture: (How to place OTHER fun stuff in some items but not all)
Basically, you can use the technique above, and add any Condition you want into the repeater’s OnItemLoad event. That will execute different conditions based on any kind of information you want. Most of what you need can be found in the Condition Builder, by switching it to “value” and then clicking the “fx” button.
Then, click Insert Variable or Function, and you’ll find all the repeater properties, which you can use to build custom conditions.
In the case of the droplist you mentioned, instead of doing the “usual” thing with a droplist, what you can do is add a new column of data that stores the value of the selected option of the droplist. Then, add an OnItemLoad case that sets the droplist based on the repeater data. That way, every time the repeater refreshes, it will set the droplist correctly and you won’t “lose” the data in all the other rows. Does that make sense? If not, I can add a sample file to show the droplist case.
Hope that helps!
-skb