more details on the argument insertAfter in addItem()

I cannot understand when this argument will be used.

The description in the addItem() api seems column related.
Could the ‘newcolumn’ item be considered as a single item? For example, I have 5 items:

If we put a new item between 2 and 3, then it’s positioned at the end of the first column;
if the new item is between 3 and 4, then it’s the first item in the 2nd column.

Anything wrong about my understanding?


could you please visualize your question? please attach any kind of a screenshot and describe what elements do you have and what new where to insert?

Hi Andrei, thx for ur reply.

I’m using php to rewrite the dhx api, so that I can dynamically prepare the arguments and generate the JS codes automatically.
When I came across form.addItem(),which looks like:

void addItem(mixed pId,object itemData,number pos,number insertAfter);

I’m stuck here and don’t know how to prepare the last argument.
By my understanding, the last argument “insertAfter” is redundant. The doc description says it’s column related, but I cannot imagine what it is. I’m not sure whether the mentioned “column” is one of the form controls, i.e. newcolumn. If it is, “insertAfter” is also redundant.