Hello all,
is there a way to add a new instance of a Subform to show in a top the existing subform? the way it works now when you add a click on button to add a subform, the new subform shows under the exisitng subform and so forth, every time I add a subform it goes to the bottom. I want the opposite to happen where new subforms, always show in the top of old subforms.
Solved! Go to Solution.
It depends on where you want the subform to actually go.
Suppose you have a button inside a subform and you always want the new subform to go on top of the entire stack of subforms:
this.parent.instanceManager.insertInstance(0);
If you want to add it right above whatever instance you're working on, then this code will work:
this.parent.instanceManager.insertInstance(this.parent.index);
Note: You'll need to add or remove reference points depending on what you're using to trigger the event, of course.
It depends on where you want the subform to actually go.
Suppose you have a button inside a subform and you always want the new subform to go on top of the entire stack of subforms:
this.parent.instanceManager.insertInstance(0);
If you want to add it right above whatever instance you're working on, then this code will work:
this.parent.instanceManager.insertInstance(this.parent.index);
Note: You'll need to add or remove reference points depending on what you're using to trigger the event, of course.
Fantastic... it worked ..excellent..thank you very much
Views
Replies
Total Likes
Views
Likes
Replies