Version

CardCaption Property

Returns or sets the text that will be displayed as the card's caption.
Syntax
'Declaration
 
Public Overridable Property CardCaption As String
public virtual string CardCaption {get; set;}
Remarks

When the band containing the Row is in Card View mode, the CardCaption property specifies the text that will be displayed in the caption area of the card that contains the row's data. This property will be read-only if the CaptionField property has been set to a valid field or column name in the CardSettings object of the band that contains the row.

Typically, you would set the value of the CardCaption property in the UltraGrid.InitializeRow event.

Example
Following code shows how you can use a custom caption for a card. It sets the caption of first card to "Custom Caption" string.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button55_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button55.Click

      Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

      ' Enable card view.
      band.CardView = True

      ' Set the CaptionField to the key of a column. Card captions will contain text
      ' from this column.
      band.CardSettings.CaptionField = "CustomerID"

      Dim row As UltraGridRow = Me.UltraGrid1.Rows(0)

      ' You can override the caption text for a particular row by setting the CardCaption
      ' property of that row to a custom text.
      row.CardCaption = "Custom Caption"

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button55_Click(object sender, System.EventArgs e)
{

	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];

	// Enable card view.
	band.CardView = true;			

	// Set the CaptionField to the key of a column. Card captions will contain text
	// from this column.
	band.CardSettings.CaptionField = "CustomerID";

	UltraGridRow row = this.ultraGrid1.Rows[0];

	// You can override the caption text for a particular row by setting the CardCaption
	// property of that row to a custom text.
	row.CardCaption = "Custom Caption";

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also