[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Collapse]Card View
   [Expand]Product Information
    Getting Started
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
     Appearance Customization
     Save and Restore Layout
      Creating Templates
      Grid Elements that Support Templates
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Creating Templates

Templates can be created using the Template Designer that is provided by the ASPxCardView control or directly in the .aspx file.

Expanded Using the Template Designer

The Template Designer allows you arrange templates. For example, you can drag a Web control from the toolbox onto the template currently being edited.

To invoke the Template Designer, click the Edit Templates task and then select the template. The designer can also be invoked using the ASPxCardView's context menu. Select the Edit Template menu item and select the template you want to edit. As a result, the ASPxCardView will be displayed in template-editing mode.

When finished, click the End Template Editing task.

Expanded Using ASP.NET Syntax

Templates are created as nested tags. To create a template using the ASP.NET syntax, do the following.

  • In the .aspx file, insert an element inside ASPxCardView (or inside a particular template column) to identify which template you are creating.

  • Add the template's contents (HTML text or other Web controls). Include property and data-binding values for the embedded controls using a standard syntax.

    The image below shows how to bind a label to a field.

  • Repeat steps 1 and 2 to create other templates.

Expanded See Also

Is this topic helpful?​​​​​​​