A complex object is a property that consists of other simple properties or complex objects. Sitefinity CMS automatically generates editors for the them, depending on their types.
The following screenshot displays a complex object with two properties of types string and int:
string
int
The following screenshot displays a complex object that has one property and another complex object, which in turn, has two properties:
You can have a custom widget that displays multiple complex objects in a table view with the ability to add or remove more entries such as the following:
In the screenshot above every row from the table displays the properties of one complex object. You can achieve this by using the TableView attribute. For more information see Customize autogenerated fields » TableView.
TableView
In cases when you have a lot of properties that cannot be displayed on one row, Sitefinity displays only the first 5 properties, you can edit the rest of the properties, by clicking (Edit) in column MORE DETAILS. This will expand all the properties of the complex object in a new page.
You can control the number of columns displayed, using the TableView property. For more information, see Customize autogenerated fields » TableView.
If there is a complex object inside a complex object, you can edit its properties, by clicking (Edit) in column INNER COMPLEX OBJECT. In case the inner complex object is in the detailed page of properties, there is a section Inner complex object that you can expand and view the properties.
To insert a complex object, use the following code sample:
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important