Edit Data
Follow the steps below to allow users to edit data:
Specify the ASPxGridBase.KeyFieldName property.
Use the Mode property to specify the control’s edit mode. The default mode is EditForm.
Add the command layout item (CardViewCommandLayoutItem) to the control’s layout.
Add command buttons.
Command Button
Setting
Delete
Edit
New
Recover
Select (button)
Select (check box)
<dx:ASPxCardView ID="CardView" runat="server">
<Columns>
<dx:CardViewTextColumn FieldName="FirstName" />
<dx:CardViewTextColumn FieldName="LastName" />
<dx:CardViewTextColumn FieldName="Title" Caption="Position" />
</Columns>
<CardLayoutProperties>
<Items>
<dx:CardViewCommandLayoutItem
ShowEditButton="true"
ShowNewButton="true"
ShowDeleteButton="true"
HorizontalAlign="Right" />
<dx:CardViewColumnLayoutItem ColumnName="FirstName" />
<dx:CardViewColumnLayoutItem ColumnName="LastName" />
<dx:CardViewColumnLayoutItem ColumnName="Title" />
</Items>
</CardLayoutProperties>
</dx:ASPxCardView>
You can use the ASPxGridDataSecuritySettings.AllowEdit, ASPxGridDataSecuritySettings.AllowDelete and ASPxGridDataSecuritySettings.AllowInsert properties to restrict edit, delete, and insert operations.
<dx:ASPxCardView ID="CardView" runat="server">
...
<SettingsDataSecurity AllowDelete="false" AllowEdit="false" AllowInsert="false" />
</dx:ASPxCardView>
See Also