Adding a row in the middle of a repeater


#1

Continuing the discussion from Adding hours in a new row of a Repeater:

Hi,

I understand that any changes made to the repeater like adding is causing the entire repeater to refresh, but this is problematic when I am setting a condition for the 4th index of the OnItemLoad function. I’m trying to add a new row (item) in the middle oi my repeater, specifically the 4th index but this will change based on the adaptive view. I have a formula set to get the last index based on the width of my rectangle holding the repeater values so that the last box before coming out of view: This last box should have the value of “More”, in mobile’s case, the 4th index and so I want to add this row into the repeater as my 4th index while keeping the rest of the repeater values the same as when the repeater was first created with its values without the “More” in it. The repeater rows after the newly created “More” should simply be shifted down a row (increase their index value by 1).

[[mobileWidth / This.width]] with mobileWidth being a global variable of 320.

image This is to give an idea of what I’m hoping to mimic.


#2

While I think this is probably something that can be done given sufficient thought, you may be over-engineering things. But obviously, I don’t know your full situation so I could be completely off the mark.

However, if you’re prototyping something, the elegance of the solution should not be much of a priority over demonstrating the concept(s). So if you want to have a “dynamic” menu bar, I’d just have separate menus for each breakpoint and be done with it. And if that collapses under its own weight later on, you can cross that bridge when you come to it.