ASPx Group Property Editor

ASPx Group Property Editor allows dividing Detail View into groups of properties. At the time when the user edits one of the groups, the remaining groups are displayed in the "View” mode, which significantly accelerates Web application.

To fully demonstrate the features, it is required to consider a business class with a significant number of properties. You can use GroupPropertyEditorObject class implemented in the Xafari.XtraEditors.Module | Editors|GroupPropertyEditorObject.cs file of the Xafari XtraEditors demo installed with product.

Note ThisObject property that returns an object of the VerticalGridPropertyEditorObject type, i.e. this property represents the entire object.

GroupPropertyEditorObject ThisObject { get; }

We will apply Vertical Grid Property Editor to this property.

Divide business class properties into the following groups: StringProperty, IntProperty, DateTimeProperty, ObjectProperty, ListProperty. It is necessary to create and configure the appropriate Detail View for each of these groups.

Invoke Model Editor, right-click the Views node and select Add|Detail View from the context menu. Focus the new Detail View and set ModelClass property to the GroupPropertyEditorObject value, set Id property to the GroupPropertyEditorObject_DetailView_Int value. Edit the Items subnode so that it includes only Int properties.

Similarly, add the Detail Views to the other groups. The image below demonstrates required Detail Views.

ASPx Group Property Editor

Next, you should configure the default Detail View by adding Property Editors, which will display conceived group.

Navigate to the Views|...|GroupPropertyEditorObject_DetailView|Items node and remove all nested elements except Name. Add new Property Editor to the Items node and set its properties as follows:

PropertyValue
PropertyNameThisObject
PropertyEditorTypeXafari.Editors.Web.ASPxGroupPropertyEditor
ViewGroupPropertyEditorObject_DetailView_Int
IdIntProperty

Similarly, add the Property Editors to the StringProperty, DateTimeProperty, ObjectProperty and ListProperty groups. Image below demonstrates configuration for the default Detail View.

ASPx Group Property Editor

Run the ASP.NET application, select the appropriate item in the navigation control and invoke GroupPropertyEditorObject_DetailView. To see the property, expand corresponding group, to edit the property, click “Edit” near the group.