VGridControlBase.Caption Property
Gets or sets the control’s caption. Enable the OptionsView.ShowCaption property to display the caption.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v24.2.dll
Declaration
[DefaultValue("")]
[DXCategory("Appearance")]
[XtraSerializableProperty]
public string Caption { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | The control’s caption. |
Remarks
Do the following to display a caption for the control:
- Enable the OptionsView.ShowCaption option.
- Set the Caption property.
Example
The following code snippet handles the VGridControl.RecordCountChanged event. The event handler updates the Vertical Grid’s caption (VGridControlBase.Caption
) to display the visible record count and total record count.
See the following demo for the complete code:
vGridControl1.OptionsView.ShowCaption = true;
//...
// RecordCountChanged event handler:
void OnRecordCountChanged(object sender, System.EventArgs e) {
UpdateCaption(vGridControl1.RecordCount, configurations.Count);
}
void UpdateCaption(int visible, int total) {
vGridControl1.Caption = string.Format("Showing {0:n0} out of {1:n0} configurations", visible, total);
}
See Also