Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CollectionFactory<T>.Add() Method

Adds a new item to a collection.

Namespace: DevExtreme.AspNet.Mvc.Factories

Assembly: DevExtreme.AspNet.Core.dll

#Declaration

C#
public T Add()

#Returns

Type Description
T

An object that can be used to further configure the added item.

#Remarks

The following example demonstrates how to use the Add method to add a new item to the Accordion item collection:

@(Html.DevExtreme().Accordion()
    .Items(items => {
        items.Add(); // call methods to configure the item
        items.Add();
    })
)
See Also