SubForm control is used quite often in the eForms development. It is a composite control which can hold multiple rows of records where each row can contain multiple sub-controls.
Use of SubForm control is quite common in a Master-Detail kind of forms where user has to interact with multiple rows and columns of set of records. It can also handle N-Level nested structure in a form.
Though it is a extremely flexible control which can give you a lot more features compared to a regular data grid control, due to extremely dynamic nature, it can result in a more bulky HTML due to multiple HTML div tags and also can result in a lot of HTML DOM manipulation which could have impact on the rendering time of a form with records in access of 50 rows. This further gets aggravated when a form has multiple SubForm controls. If not used properly, SubForm control could be one of the key reasons behind slower form rendering time.
With AgilePoint NX v8.0, the SubForm control has been redesigned for faster performance and enhanced feature and gives a significantly faster form rendering time. Here are some of the key features added to the new SubForm control
- Expand All Records
- Collapse All Records
- Set Maximum Height
- Pagination has been improved with on demand loading of records as user paginates through the list
- SubForm features has been implemented with almost Zero DOM manipulation which results in faster form rendering.
- Custom column width support for column layout
Going forward we highly recommend using the new SubForm control for designing your applications. The existing SubForm control will continue to be available in the control set for next couple of releases but has been marked as a legacy control. It is there for backward compatibility reasons only. We will continue to support apps which used the legacy SubForm control for foreseeable future so that any of the existing running apps won;t get impacted but you will also be provided with a migration option to auto convert legacy SubForm control to the new one with a click of a button. With this strategy, we have ensured all existing apps will continue to work as is till you decide to update the control for a seamless experience. I will cover migration in a separate article.
Here are some performance related statistics showing the improvements made in a SubForm control and the amount of time saved while rendering SubForm control. Please note this is time saved while rendering the SubForm control only and not the time saved for the entire form.
|Test Case||# of rows||% time Saving|
|Single SubForm control with 6 sub-controls – No pagination and no lookup control||40-500||25% – 52%|
|Single SubForm control with 6 sub-controls – pagination with 15 rows but no lookup control||40-500||55% – 97%|
|Single SubForm control with 6 sub-controls – No pagination and single lookup control||40-500||30% – 45%|
|Single SubForm control with 6 sub-controls – pagination with 15 rows and single lookup control||40-500||73% – 96%|
|Three SubForm controls with 6 sub-controls – No pagination and no lookup control||40-500||20% – 45%|
|Three SubForm controls with 6 sub-controls – pagination with 15 rows but no lookup control||40-500||57% – 97%|
|Three SubForm controls with 6 sub-controls – No pagination and one lookup control in each SubForm||40-150||35% – 43%|
|Three SubForm controls with 6 sub-controls – pagination with 15 rows and one lookup control in each SubForm||40-150||70% – 93%|