行を含むバンドが Card View モードである場合、CardCaption プロパティは、行データを含むカードのキャプション領域に表示されるテキストを指定します。CaptionField プロパティが有効なフィールド、または行を含むバンドの CardSettings オブジェクトの列名に設定されている場合、このプロパティは読み取り専用になります。
通常、UltraGrid.InitializeRow イベントで CardCaption プロパティの値を設定します。
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"; }