ASPxClientCardView.StartEditCard(visibleIndex) Method
Switches the CardView to edit mode.
Declaration
StartEditCard(
visibleIndex: number
): void
Parameters
Name | Type | Description |
---|---|---|
visibleIndex | number | The card’s visible index. |
Remarks
Use the StartEditCard method to switch the CardView to edit mode in code. End-users can do this by clicking the Edit command item displayed within the command column.
Example
The following example switches ASPxCardView to edit mode when an end user clicks a card. To implement this, handle the ASPxClientCardView.CardDblClick client-side event and call the ASPxClientCardView.StartEditCard
method.
<dx:ASPxCardView ID="ASPxCardView1" KeyFieldName="ID" AutoGenerateColumns="False" runat="server" ClientInstanceName="card">
<ClientSideEvents CardDblClick="function(s, e) {
s.StartEditCard(e.visibleIndex);
}" />
<Columns>
<dx:CardViewTextColumn FieldName="ID" VisibleIndex="0">
</dx:CardViewTextColumn>
<dx:CardViewTextColumn FieldName="Data" VisibleIndex="1">
</dx:CardViewTextColumn>
</Columns>
<CardLayoutProperties>
<Items>
...
</Items>
</CardLayoutProperties>
</dx:ASPxCardView>
See Also